Skip to content
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

Add when conditional to Ansible remediation of sssd_enable_pam_services #11982

Conversation

vojtapolasek
Copy link
Collaborator

port of #11979 into master branch

older Ansible versions might terminate prematurely if there are no config files found in /etc/sssd/conf.d directory
@vojtapolasek vojtapolasek added bugfix Fixes to reported bugs. Ansible Ansible remediation update. RHEL7 Red Hat Enterprise Linux 7 product related. labels May 9, 2024
@vojtapolasek vojtapolasek added this to the 0.1.74 milestone May 9, 2024
Copy link

github-actions bot commented May 9, 2024

Start a new ephemeral environment with changes proposed in this pull request:

rhel8 (from CTF) Environment (using Fedora as testing environment)
Open in Gitpod

Fedora Testing Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

Copy link

github-actions bot commented May 9, 2024

This datastream diff is auto generated by the check Compare DS/Generate Diff

Click here to see the full diff
ansible 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)

Copy link

github-actions bot commented May 9, 2024

🤖 A k8s content image for this PR is available at:
ghcr.io/complianceascode/k8scontent:11982
This image was built from commit: 98cd93e

Click here to see how to deploy it

If you alread have Compliance Operator deployed:
utils/build_ds_container.py -i ghcr.io/complianceascode/k8scontent:11982

Otherwise deploy the content and operator together by checking out ComplianceAsCode/compliance-operator and:
CONTENT_IMAGE=ghcr.io/complianceascode/k8scontent:11982 make deploy-local

@jan-cerny jan-cerny self-assigned this May 9, 2024
Copy link

codeclimate bot commented May 9, 2024

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.

@jan-cerny
Copy link
Collaborator

/packit build

@jan-cerny jan-cerny merged commit 5a9dce4 into ComplianceAsCode:master May 10, 2024
112 of 113 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ansible Ansible remediation update. bugfix Fixes to reported bugs. RHEL7 Red Hat Enterprise Linux 7 product related.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants