Skip to content

Commit

Permalink
set correct permissions on sysctl configuration files
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Sjögren <[email protected]>
  • Loading branch information
konstruktoid committed Jan 23, 2024
1 parent ff22270 commit 568b45d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tasks/sysctl.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
---
- name: Ensure sysctl configuration dir has the correct permissions
become: true
ansible.builtin.file:
path: "{{ sysctl_conf_dir }}"
mode: "0755"
owner: root
group: root
state: directory

- name: Ensure old sysctl file is removed
become: true
ansible.builtin.file:
Expand All @@ -10,7 +19,7 @@
ansible.builtin.template:
src: "{{ sysctl_main_config_template }}"
dest: "{{ sysctl_conf_dir }}/zz-main-hardening.conf"
mode: "0755"
mode: "0644"
owner: root
group: root
backup: false
Expand Down Expand Up @@ -61,7 +70,7 @@
ansible.builtin.template:
src: "{{ sysctl_ipv6_config_template }}"
dest: "{{ sysctl_conf_dir }}/zz-ipv6-hardening.conf"
mode: "0755"
mode: "0644"
owner: root
group: root
backup: false
Expand Down

0 comments on commit 568b45d

Please sign in to comment.