Files
semaphore/playbooks/enable_user_password_reset.yml
2025-07-21 14:26:07 -05:00

19 lines
420 B
YAML

---
- 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