Skip to content
Snippets Groups Projects
Commit 6e5d0b54 authored by jurgenhaas's avatar jurgenhaas
Browse files

Optimize mode and ownership changes

parent 0c6c027e
Branches
No related tags found
No related merge requests found
......@@ -38,11 +38,16 @@
with_items: admins
- name: "Keys | Set ownership of authorized key file"
shell: chown {{ item }}:root /home/{{ item }}/.ssh/auth_keys_fresh
file:
path="/home/{{ item }}/.ssh/auth_keys_fresh"
owner="{{ item }}"
group="root"
with_items: admins
- name: "Keys | Set permission for authorized key file"
shell: chmod 600 /home/{{ item }}/.ssh/auth_keys_fresh
file:
path="/home/{{ item }}/.ssh/auth_keys_fresh"
mode=600
with_items: admins
- name: "Keys | Make sure the authorized_keys file exists"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment