Skip to content

Commit

Permalink
allow applying a scap policy after manual hardening
Browse files Browse the repository at this point in the history
  • Loading branch information
pondrejk committed Feb 25, 2025
1 parent ab40a81 commit 83e5636
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/foreman/longrun/test_oscap.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ def test_positive_oscap_remediation(
assert contenthost.execute("rpm -q aide").status == 0


@pytest.mark.rhel_ver_list([7, 8, 9])
@pytest.mark.rhel_ver_list([7, 8, 9, 10])
@pytest.mark.tier4
def test_positive_oscap_run_via_ansible_bz_1814988(
module_org, default_proxy, lifecycle_env, target_sat, rex_contenthost
Expand Down Expand Up @@ -468,6 +468,11 @@ def test_positive_oscap_run_via_ansible_bz_1814988(
f'/usr/share/xml/scap/ssg/content/ssg-{distro}-ds.xml',
)

# disable gpgcheck enabled by the above security policy
contenthost.run(
"sed -i 's/gpgcheck=1/gpgcheck=0/' /etc/yum.repos.d/foreman_registration1.repo "
)

# Apply policy
job_id = target_sat.cli.Host.ansible_roles_play({'name': contenthost.hostname.lower()})[0].get(
'id'
Expand Down

0 comments on commit 83e5636

Please sign in to comment.