21 lines
513 B
YAML
21 lines
513 B
YAML
---
|
|
- name: pubkeys | Add public ssh keys for root
|
|
ansible.posix.authorized_key:
|
|
user: root
|
|
key: "{{ item }}"
|
|
state: present
|
|
loop: "{{ root_ssh_keys | default([]) }}"
|
|
when: manage_root_ssh_keys
|
|
tags:
|
|
- root_pubkeys
|
|
|
|
- name: pubkeys | Remove obsolete keys from the authorized ones
|
|
ansible.posix.authorized_key:
|
|
user: root
|
|
key: "{{ item }}"
|
|
state: absent
|
|
loop: "{{ obsolete_root_ssh_keys | default([]) }}"
|
|
when: obsolete_root_ssh_keys is defined
|
|
tags:
|
|
- root_pubkeys
|