how to fixed update_password ?

6 views
Skip to first unread message

Daniel Lin

unread,
Jun 21, 2016, 12:24:17 AM6/21/16
to Ansible Project
- 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

When  I set up update_password: on_create is not working, still will update the user password, how can i fixed it ?


Reply all
Reply to author
Forward
0 new messages