forked from data.coop/ansible
Always update password and overwrite keys
This commit is contained in:
parent
5b2e2c0f60
commit
fc0c0c5036
|
@ -4,22 +4,20 @@
|
|||
name: "{{ item.name }}"
|
||||
comment: "{{ item.comment }}"
|
||||
password: "{{ item.password }}"
|
||||
update_password: "on_create"
|
||||
groups: "{{ item.groups }}"
|
||||
groups: "{{ item.groups }}"
|
||||
update_password: "always"
|
||||
loop: "{{ users | default([]) }}"
|
||||
|
||||
- name: "Add ssh authorized_keys"
|
||||
authorized_key:
|
||||
user: "{{ item.0.name }}"
|
||||
key: "{{ item.1 }}"
|
||||
with_subelements:
|
||||
- "{{ users | default([]) }}"
|
||||
- keys
|
||||
user: "{{ item.name }}"
|
||||
key: "{{ item.keys | join('\n') }}"
|
||||
exclusive: true
|
||||
loop: "{{ users | default([]) }}"
|
||||
|
||||
- name: "Add ssh authorized_keys to root user"
|
||||
authorized_key:
|
||||
user: "root"
|
||||
key: "{{ item.1 }}"
|
||||
with_subelements:
|
||||
- "{{ users | default([]) }}"
|
||||
- keys
|
||||
key: "{{ item.keys | join('\n') }}"
|
||||
exclusive: true
|
||||
loop: "{{ users | default([]) }}"
|
||||
|
|
Loading…
Reference in a new issue