-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: When using CIS hardening, the task of copying the systcl config fails under certain conditions #193
Comments
Facing the same issue, should be fixxed when following PR is approved: #206 |
Just tested, looks like it is resolved. Thanks @jLemmings! |
Unfortunally, it is still failing. module.create_vms.null_resource.execute_ansible_create_playbooks[0] (local-exec): fatal: [testproxmox-m1]: FAILED! => {"changed": false, "msg": "Source /usr/local/share/rke2/rke2-cis-sysctl.conf not found"} This happens because the test is done if usr_local.stat.writeable = True, instead of testing that /usr/local is read-only or has a dedicated mount point. In my case it is a dedicated mountpoint (default with Suse Linux) |
@Evantage-WS looking into it and will come up with a new PR. |
@Evantage-WS does it work for you after the last PR? Working great for me on multiple RHEL9 hosts which are CIS hardened. |
Hi @jLemmings, Sorry, but no. It is still failing, I entered some feedback in the merge, see #213 (comment) Thanks! |
@Evantage-WS what OS are you running? I was not aware of the mountpoint binary which makes it a bit nicer. What is the output of |
Hi @jLemmings, I am running openSUSE 15.6 and Suse Linux Enterprise Server (SLES) 15.5 output is (with and without space in path
|
The space is there on purpose to not match appended '/'. What are the return codes of both commands? |
k3s-clusterx-m1:~ # grep '/usr/local ' /proc/mounts |
Oh the condition should be an "or" and not an "and" statement: https://github.com/lablabs/ansible-role-rke2/blob/main/tasks/cis.yml#L23 Am i right assuming you do not have a separate |
@jLemmings yes, correct |
Summary
When enabling cis, with "cis-1.23", which is deprecated btw, it is "cis" now, it fails when copying the sysctl values in
- name: Copy systemctl config file for kernel hardening
. My download is not in /usr/local/share, but in /opt/rke2/share/rke2/rke2-cis-sysctl.conf. This because of the following:Tested on SLES 15.5
Issue Type
Bug Report
Ansible Version
Steps to Reproduce
on a machine with the following conditions:
Expected Results
Looks in both directories for the file
Actual Results
Unable to find /usr/local/share/rke2/rke2-cis-sysctl.conf
The text was updated successfully, but these errors were encountered: