You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
The cis_4.2.1.x.yml failed with the following error:
Syntax Error while loading YAML.
found unknown escape character
The error appears to be in '/etc/ansible/roles/UBUNTU22-CIS/tasks/section_4/cis_4.2.1.x.yml': line 114, column 25, but may be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
path: "{{ systemd_conf_file | default('/usr/lib/tmpfiles.d/systemd.conf') }}"
regexp: "^z /var/log/journal/%m/system.journal (!?06(0|4)0) root"
^ here
Expected Behavior
No errors
Actual Behavior
After the error the role isn't run and stops
Control(s) Affected
All Controls
Environment (please complete the following information):
Ansible Version: 2.9.27
Host Python Version: 2.7.5
Ansible Server Python Version: 2.7.5
Additional Details:
Additional Notes
NA
Possible Solution
For me it worked when I changed double quotes to single quotes:
"^z /var/log/journal/%m/system.journal (!?06(0|4)0) root"
Into
'^z /var/log/journal/%m/system.journal (!?06(0|4)0) root'
But as you can see my Ansible version is ancient, so this may cause it to break on newer versions
The text was updated successfully, but these errors were encountered:
Thank you for taking the time to raise the issue and provide the details. It is with feedback we can improve. You are correct in your layout and while it should be ansible 2.10+ yours in the correct way.
I have amended this and a couple of other similar statements.
I will push this to the Jun23_updates branch which i hope we can merge to devel soon.
Hi,
The cis_4.2.1.x.yml failed with the following error:
Syntax Error while loading YAML.
found unknown escape character
The error appears to be in '/etc/ansible/roles/UBUNTU22-CIS/tasks/section_4/cis_4.2.1.x.yml': line 114, column 25, but may be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
path: "{{ systemd_conf_file | default('/usr/lib/tmpfiles.d/systemd.conf') }}"
regexp: "^z /var/log/journal/%m/system.journal (!?06(0|4)0) root"
^ here
Expected Behavior
No errors
Actual Behavior
After the error the role isn't run and stops
Control(s) Affected
All Controls
Environment (please complete the following information):
Additional Notes
NA
Possible Solution
For me it worked when I changed double quotes to single quotes:
"^z /var/log/journal/%m/system.journal (!?06(0|4)0) root"
Into
'^z /var/log/journal/%m/system.journal (!?06(0|4)0) root'
But as you can see my Ansible version is ancient, so this may cause it to break on newer versions
The text was updated successfully, but these errors were encountered: