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 }}"
|
name: "{{ item.name }}"
|
||||||
comment: "{{ item.comment }}"
|
comment: "{{ item.comment }}"
|
||||||
password: "{{ item.password }}"
|
password: "{{ item.password }}"
|
||||||
update_password: "on_create"
|
|
||||||
groups: "{{ item.groups }}"
|
groups: "{{ item.groups }}"
|
||||||
|
update_password: "always"
|
||||||
loop: "{{ users | default([]) }}"
|
loop: "{{ users | default([]) }}"
|
||||||
|
|
||||||
- name: "Add ssh authorized_keys"
|
- name: "Add ssh authorized_keys"
|
||||||
authorized_key:
|
authorized_key:
|
||||||
user: "{{ item.0.name }}"
|
user: "{{ item.name }}"
|
||||||
key: "{{ item.1 }}"
|
key: "{{ item.keys | join('\n') }}"
|
||||||
with_subelements:
|
exclusive: true
|
||||||
- "{{ users | default([]) }}"
|
loop: "{{ users | default([]) }}"
|
||||||
- keys
|
|
||||||
|
|
||||||
- name: "Add ssh authorized_keys to root user"
|
- name: "Add ssh authorized_keys to root user"
|
||||||
authorized_key:
|
authorized_key:
|
||||||
user: "root"
|
user: "root"
|
||||||
key: "{{ item.1 }}"
|
key: "{{ item.keys | join('\n') }}"
|
||||||
with_subelements:
|
exclusive: true
|
||||||
- "{{ users | default([]) }}"
|
loop: "{{ users | default([]) }}"
|
||||||
- keys
|
|
||||||
|
|
Loading…
Reference in a new issue