2015-05-28 11:32:57 +02:00
|
|
|
---
|
|
|
|
- name: Install the ssh keys for the authorized users
|
|
|
|
authorized_key: user=root key="{{ item }}" state=present
|
2016-03-07 15:47:16 +01:00
|
|
|
with_items: '{{ root_ssh_keys | default([]) }}'
|
|
|
|
when: manage_root_ssh_keys
|
2016-03-03 18:55:27 +01:00
|
|
|
tags: [ 'pubkeys', 'ssh_keys' ]
|
2015-05-28 11:32:57 +02:00
|
|
|
|
|
|
|
- name: Remove obsolete ssh keys if there are any
|
|
|
|
authorized_key: user=root key="{{ item }}" state=absent
|
2016-03-07 15:47:16 +01:00
|
|
|
with_items: '{{ obsolete_root_ssh_keys | default([]) }}'
|
2015-05-28 11:32:57 +02:00
|
|
|
when: obsolete_ssh_key is defined
|
2016-03-03 18:55:27 +01:00
|
|
|
tags: [ 'pubkeys', 'ssh_keys' ]
|
2015-05-28 11:32:57 +02:00
|
|
|
|