luks_ssh: Specify directory permissions

This patch reduces the permissions on the install directory to just the root user and also fixes the ansible-lint issue by specifying the `mode`.
This commit is contained in:
saibotk 2020-09-26 21:35:26 +02:00
parent 228dc7516e
commit 6782cb8191
No known key found for this signature in database
GPG key ID: A3299C587D5DF523

View file

@ -22,6 +22,9 @@
file:
path: "{{ dracut_ssh_dir }}"
state: directory
mode: '0755'
owner: 'root'
group: 'root'
become: true
- name: Add SSH keys for grub2
@ -41,6 +44,8 @@
src: "module-setup.sh"
dest: "{{ dracut_ssh_dir }}/module-setup.sh"
mode: '0755'
owner: 'root'
group: 'root'
become: true
notify: Regenerate dracut
@ -48,6 +53,9 @@
copy:
src: "{{ item }}"
dest: "{{ dracut_ssh_dir }}/{{ item }}"
mode: '0644'
owner: 'root'
group: 'root'
become: true
with_items:
- "sshd.service"
@ -57,6 +65,9 @@
template:
src: "{{ item }}"
dest: "{{ dracut_ssh_dir }}/{{ item }}"
mode: '0644'
owner: 'root'
group: 'root'
become: true
with_items:
- "sshd_config"