add playbook to allow users to set their own passwords

This commit is contained in:
2025-06-29 22:31:43 -05:00
parent d70bcef8c2
commit 2cd25c0277

View File

@@ -0,0 +1,18 @@
---
- name: Allow user to set their own password
hosts: all
become: true
gather_facts: false
vars:
username: "{{ username }}"
tasks:
- name: Unlock password so user can run passwd
ansible.builtin.command: "passwd -d {{ username }}"
when: not ansible_check_mode
- name: Ensure user is not locked
ansible.builtin.user:
name: "{{ username }}"
password_lock: false