Add when conditional to Ansible remediation of sssd_enable_pam_services#11982
Conversation
older Ansible versions might terminate prematurely if there are no config files found in /etc/sssd/conf.d directory
|
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_pam_services' differs.
--- xccdf_org.ssgproject.content_rule_sssd_enable_pam_services
+++ xccdf_org.ssgproject.content_rule_sssd_enable_pam_services
@@ -39,7 +39,9 @@
replace: \1,pam
with_items: '{{ sssd_conf_d_files.files | map(attribute=''path'') }}'
register: modify_lines_sssd_conf_d_files
- when: '"sssd-common" in ansible_facts.packages'
+ when:
+ - '"sssd-common" in ansible_facts.packages'
+ - sssd_conf_d_files.matched is defined and sssd_conf_d_files.matched >= 1
tags:
- CCE-82446-6
- NIST-800-53-CM-6(a) |
|
🤖 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 98cd93e 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. |
|
/packit build |
port of #11979 into master branch