-
Notifications
You must be signed in to change notification settings - Fork 696
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
Simplify use of ansible_ensure_pam_module_option macro #12159
Simplify use of ansible_ensure_pam_module_option macro #12159
Conversation
No need to escape special characters anymore for the control parameter in ansible_ensure_pam_module_option macro. It is treated within the macro. Signed-off-by: Marcus Burghardt <[email protected]>
This datastream diff is auto generated by the check Click here to see the full diffansible remediation for rule 'xccdf_org.ssgproject.content_rule_sssd_enable_smartcards' differs.
--- xccdf_org.ssgproject.content_rule_sssd_enable_smartcards
+++ xccdf_org.ssgproject.content_rule_sssd_enable_smartcards
@@ -300,7 +300,7 @@
- name: Enable Smartcards in SSSD - Define a fact for control already filtered in
case filters are used
ansible.builtin.set_fact:
- pam_module_control: \[success=done authinfo_unavail=ignore ignore=ignore default=die\]
+ pam_module_control: '[success=done authinfo_unavail=ignore ignore=ignore default=die]'
- name: Enable Smartcards in SSSD - Check if expected PAM module line is present
in /etc/pam.d/system-auth
@@ -361,7 +361,7 @@
- name: Enable Smartcards in SSSD - Define a fact for control already filtered in
case filters are used
ansible.builtin.set_fact:
- pam_module_control: \[success=done authinfo_unavail=ignore ignore=ignore default=die\]
+ pam_module_control: '[success=done authinfo_unavail=ignore ignore=ignore default=die]'
- name: Enable Smartcards in SSSD - Check if the required PAM module option is present
in /etc/pam.d/system-auth |
🤖 A k8s content image for this PR is available at: Click here to see how to deploy itIf you alread have Compliance Operator deployed: Otherwise deploy the content and operator together by checking out ComplianceAsCode/compliance-operator and: |
Code Climate has analyzed commit 068e6e7 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 59.4% (0.0% change). View more on Code Climate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have checked build/rhel9/fixes/ansible/sssd_enable_smartcards.yml. Also, I have run the Automatus test scenarios for this rule.
Description:
No need to escape special characters anymore for the control parameter in
ansible_ensure_pam_module_option
macro.It is treated within the macro.
Rationale:
Simplification.
Review Hints:
./build_product rhel9
./tests/automatus.py rule --libvirt qemu:///session rhel9 --datastream build/ssg-rhel9-ds.xml --dontclean --remediate-using ansible sssd_enable_smartcards