2019-11-03 17:19:53 +00:00
|
|
|
---
|
|
|
|
- block:
|
|
|
|
- name: Set authorized_key for ssh users
|
|
|
|
authorized_key:
|
|
|
|
user: "{{ item.name }}"
|
|
|
|
key: "{{ item.key }}"
|
|
|
|
state: present
|
2019-11-03 23:48:25 +00:00
|
|
|
loop: "{{ users_default_users }}"
|
2019-11-03 17:19:53 +00:00
|
|
|
loop_control:
|
|
|
|
label: "{{ item.name }}"
|
|
|
|
when: item.key is defined
|
|
|
|
become: True
|
|
|
|
become_user: root
|