I got a problem, I use ansible user module, when i set update_password:
on_create, it's not work,still will update_password everytime, my code is
below, and anyone know how to fixed it ?
- name: Create Active User
user:
name: "{{ item }}"
uid: "{{ management_active_users[item].uid | default(omit) }}"
comment: "{{ management_active_users[item].full_name | default('') }}"
createhome: "{{ management_active_users[item].createhome |
default('yes') }}"
group: "{{ management_active_users[item].group | default(omit) }}"
groups: "{{ management_active_users[item].groups | default('') |
join(',') }}"
shell: "{{ management_active_users[item].shell | default('/bin/bash')
}}"
append: "{{ management_active_users[item].append | default('no') }}"
state: "{{ management_active_users[item].state | default('present') }}"
with_items: "{{ management_active_users }}"
when: management_active_users is defined
- name: Setup Active User Password
user:
name: "{{ item }}"
password: "{{ user_passwd | password_hash('sha512') }}"
update_password: on_create
with_items: "{{ management_active_users }}"
when: management_active_users[item].password is defined
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/5a60ff67-eac5-4e1d-bbaa-26b048f47699%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.