Added fix for #399 thanks to @trumbaut

Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
Mark Bolwell 2025-10-03 08:19:07 +01:00
parent 9df94973d7
commit 6500e39f42
No known key found for this signature in database
GPG key ID: 997FF7FE93AEB5B9
2 changed files with 3 additions and 3 deletions

View file

@ -41,8 +41,8 @@
ansible.builtin.file:
path: "{{ item.path }}"
owner: root
group: root
mode: 'u-x,go-rwx'
group: "{{ 'ssh_keys' if (item.gr_name == 'ssh_keys') else 'root' }}"
mode: "{{ 'u-x,g-wx,o-rwx' if (item.gr_name == 'ssh_keys') else 'u-x,go-rwx' }}"
loop: "{{ discovered_ssh_private_host_key.files }}"
loop_control:
label: "{{ item.path }}"