We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 626725a commit 3b69097Copy full SHA for 3b69097
tasks/cis.yml
@@ -13,9 +13,13 @@
13
comment: etcd user
14
state: present
15
16
+- name: Check if separate partition
17
+ command: grep '/usr/local ' /proc/mounts
18
+ register: partition_result
19
+
20
- name: Copy systemctl config file for kernel hardening
21
ansible.builtin.copy:
- src: "{{ '/usr/local/share/rke2/rke2-cis-sysctl.conf' if usr_local.stat.writeable == True else '/opt/rke2/share/rke2/rke2-cis-sysctl.conf' }}"
22
+ src: "{{ '/usr/local/share/rke2/rke2-cis-sysctl.conf' if (usr_local.stat.writeable) and (partition_result.rc == 1) else '/opt/rke2/share/rke2/rke2-cis-sysctl.conf' }}"
23
dest: /etc/sysctl.d/60-rke2-cis.conf
24
mode: 0600
25
remote_src: true
0 commit comments