mirror of
https://github.com/ansible-lockdown/RHEL9-CIS.git
synced 2025-12-24 22:23:06 +00:00
Make task flexible by checking if the current file group owner is ssh_key
Signed-off-by: Thomas Rumbaut <thomas@rumbaut.be>
This commit is contained in:
parent
c69fedcf0a
commit
6429c1b8ef
1 changed files with 2 additions and 2 deletions
|
|
@ -41,8 +41,8 @@
|
|||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 'u-x,go-rwx'
|
||||
group: "{{ 'ssh_keys' if (item.group == 'ssh_keys') else 'root' }}"
|
||||
mode: "{{ 'u-x,g-wx,o-rwx' if (item.group == 'ssh_keys') else 'u-x,go-rwx' }}"
|
||||
loop: "{{ discovered_ssh_private_host_key.files }}"
|
||||
loop_control:
|
||||
label: "{{ item.path }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue