xoxys.users/tasks/users_keys.yml

15 lines
357 B
YAML
Raw Normal View History

2019-11-03 17:19:53 +00:00
---
- block:
- name: Set authorized_key for ssh users
authorized_key:
user: "{{ item.name }}"
key: "{{ item.sshkeys }}"
exclusive: True
2019-11-03 17:19:53 +00:00
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.sshkeys is defined
2019-11-03 17:19:53 +00:00
become: True
become_user: root