2015-05-28 11:32:57 +02:00
|
|
|
---
|
|
|
|
- name: Install the ssh keys for non root users
|
|
|
|
authorized_key: user={{ item.0.name }} key="{{ item.1 }}" state=present
|
2015-10-01 17:56:38 +02:00
|
|
|
when:
|
|
|
|
- non_root_users
|
2015-05-28 11:32:57 +02:00
|
|
|
with_subelements:
|
|
|
|
- ssh_users_list
|
|
|
|
- authorized_keys
|
2015-10-01 17:56:38 +02: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={{ item.0.name }} key="{{ item.1 }}" state=absent
|
|
|
|
when:
|
|
|
|
- obsolete_ssh_key is defined
|
|
|
|
- non_root_users
|
|
|
|
with_subelements:
|
|
|
|
- ssh_users_list
|
|
|
|
- authorized_keys
|
2015-10-01 17:56:38 +02:00
|
|
|
tags: [ "pubkeys", "ssh_keys" ]
|