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 Ansible for kernel_module_ipv6_option_disabled #5737

Conversation

yuumasato
Copy link
Member

@yuumasato yuumasato commented May 4, 2020

Description:

  • Add Ansible remediation for kernel_module_ipv6_option_disabled that closely follows behavior of Bash remediation.

Notes:

  • The remediation of this rule also sets sysctl disable_ipv6 to 1, as some other module may be pulling in the module as a dependency.
    Reference: https://access.redhat.com/solutions/72733.

  • The remediation does more than disabling only one kernel module, so it is not suitable for "templation" (use of templating system).

@jan-cerny
Copy link
Collaborator

@mildas Could the bot have its own account?

@jan-cerny
Copy link
Collaborator

@mildas People might think that you're a bot 😄

#!/bin/bash
# platform = Red Hat Enterprise Linux 7

echo "options ipv6 disable=1" > /etc/modprobe.d/ipv6.conf
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test is named module_and_sysctl_disabled... but I don't see anything about sysctl in this test. Is the sysctl option disabled by default?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, test renamed.

The remediation does more than disabling only one kernel module, so it
is not suitable for "templation" (use of templating system).
@yuumasato yuumasato force-pushed the audit_kernel_module_ipv6_option_disable branch from e611a54 to e14418e Compare May 5, 2020 13:15
@mildas
Copy link
Contributor

mildas commented May 5, 2020

Changes identified:
Rule kernel_module_ipv6_option_disabled:
 Ansible remediation newly added.

Recommended tests to execute:
 build_product rhel6
 test_suite.py rule --libvirt qemu:///system test-suite-vm --remediate ansible --datastream build/ssg-rhel6-ds.xml kernel_module_ipv6_option_disabled

@vojtapolasek
Copy link
Collaborator

Thank you, approving.

@vojtapolasek vojtapolasek merged commit b5d4e57 into ComplianceAsCode:master May 5, 2020
@yuumasato yuumasato added this to the 0.1.50 milestone May 11, 2020
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants