You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
418 B
YAML
20 lines
418 B
YAML
- name: "Add backup group"
|
|
ansible.builtin.group:
|
|
name: backup
|
|
state: present
|
|
|
|
- name: "Add backup users"
|
|
ansible.builtin.user:
|
|
name: "{{ item.name }}"
|
|
groups: "backup"
|
|
state: present
|
|
loop: "{{ backup_users }}"
|
|
|
|
- name: "Add keys for backup users"
|
|
ansible.posix.authorized_key:
|
|
user: "{{ item.0.name }}"
|
|
key: "{{ item.1 }}"
|
|
with_subelements:
|
|
- "{{ backup_users }}"
|
|
- keys
|