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

Redundant conditional statements in 1.6.1.x #128

Open
ipruteanu-sie opened this issue Dec 5, 2023 · 0 comments
Open

Redundant conditional statements in 1.6.1.x #128

ipruteanu-sie opened this issue Dec 5, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ipruteanu-sie
Copy link
Contributor

Describe the Issue
Here it's specified that tasks in cis_1.6.1.x.yml file shall be included when SELinux is not disabled(when: not rhel9cis_selinux_disable):

- name: "SECTION | 1.6 | Mandatory Access Control"
  ansible.builtin.include_tasks:
      file: cis_1.6.1.x.yml
  when: not rhel9cis_selinux_disable

Therefore, any similar condition present on tasks in file: cis_1.6.1.x.yml like this one would be redundant:

- name: "1.6.1.3 | PATCH | Ensure SELinux policy is configured"
  ansible.posix.selinux:
      conf: /etc/selinux/config
      policy: "{{ rhel9cis_selinux_pol }}"
      state: "{{ rhel9cis_selinux_enforce }}"
  when:
      - not rhel9cis_selinux_disable
      - rhel9cis_rule_1_6_1_3
[...]

Expected Behavior
No redundant conditionals should be present.

Actual Behavior
Redundant conditionals are present.

Control(s) Affected
1.6.1.* rules

Environment (please complete the following information):

  • branch being used: [e.g. devel]
    [N/A]

Additional Notes
Anything additional goes here

Possible Solution
I'll add a PR immediately.

@ipruteanu-sie ipruteanu-sie added the bug Something isn't working label Dec 5, 2023
@uk-bolly uk-bolly self-assigned this Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants