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

Rsyslog redundant conditional #141

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

Rsyslog redundant conditional #141

ipruteanu-sie opened this issue Dec 8, 2023 · 0 comments
Assignees
Labels
invalid This doesn't seem right

Comments

@ipruteanu-sie
Copy link
Contributor

Describe the Issue
redundant conditional in 4.2.1.3

Expected Behavior

- name: "4.2.1.3 | PATCH | Ensure journald is configured to send logs to rsyslog"
  ansible.builtin.lineinfile:
      path: /etc/systemd/journald.conf
      regexp: "^#ForwardToSyslog=|^ForwardToSyslog="
      line: ForwardToSyslog=yes
  notify: Restart rsyslog
  when:
      - rhel9cis_rule_4_2_1_3
      - rhel9cis_syslog == "rsyslog"                           ** NOT NEEDED

since this import_tasks is already conditionally executing all tasks in 4.2.1.x file:

- name: "SECTION | 4.2.1 | Configure rsyslog"
  ansible.builtin.import_tasks:
      file: cis_4.2.1.x.yml
  when: rhel9cis_syslog == 'rsyslog'

Actual Behavior
A clear and concise description of what's happening.

- name: "4.2.1.3 | PATCH | Ensure journald is configured to send logs to rsyslog"
  ansible.builtin.lineinfile:
      path: /etc/systemd/journald.conf
      regexp: "^#ForwardToSyslog=|^ForwardToSyslog="
      line: ForwardToSyslog=yes
  notify: Restart rsyslog
  when:
      - rhel9cis_rule_4_2_1_3
      - rhel9cis_syslog == "rsyslog"

Control(s) Affected
4.2.1.3

  • branch being used: [e.g. devel]

Possible Solution
PR

@ipruteanu-sie ipruteanu-sie added the bug Something isn't working label Dec 8, 2023
@uk-bolly uk-bolly added invalid This doesn't seem right and removed bug Something isn't working labels Feb 19, 2024
@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
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants