Verified Commit dcc26b26 authored by Florian Pritz's avatar Florian Pritz
Browse files

archusers: Remove authorized_keys if no ssh key is defined in archusers


list

Signed-off-by: Florian Pritz's avatarFlorian Pritz <bluewind@xinu.at>
parent 49caae39
......@@ -22,6 +22,11 @@
when: item.value.ssh_key is defined
with_dict: "{{ arch_users }}"
- name: remove ssh keys if undefined
file: path=/home/{{item.key}}/.ssh/authorized_keys state=absent
when: item.value.ssh_key is not defined
with_dict: "{{ arch_users }}"
- name: get list of remote users
find: paths="/home" file_type="directory"
register: all_users
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment