xoxys.users/tasks/users_keys.yml

14 lines
317 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.key }}"
state: present
loop: "{{ users_users }}"
loop_control:
label: "{{ item.name }}"
when: item.key is defined
become: True
become_user: root