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

Fix changes in Ansible tasks not expected to fail #10427

Merged
merged 3 commits into from
Apr 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
ansible.builtin.command:
cmd: authselect select "{{ var_authselect_profile }}"
register: result_authselect_select
failed_when: result_authselect_select.rc not in [0, 4]
failed_when: false

- name: Verify if PAM has been altered
ansible.builtin.command:
Expand Down
10 changes: 5 additions & 5 deletions shared/macros/10-ansible.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -641,15 +641,15 @@ The following macro remediates Audit syscall rule in :code:`/etc/audit/audit.rul
- name: "Test for id_provider different than Active Directory (ad)"
command: grep -qzosP '[[:space:]]*\[domain\/[^]]*]([^(\n)]*(\n)+)+?[[:space:]]*id_provider[[:space:]]*=[[:space:]]*((?i)ad)[[:space:]]*$' /etc/sssd/sssd.conf
register: test_id_provider
failed_when: test_id_provider.rc not in [0, 1]
changed_when: False
failed_when: false
changed_when: false
check_mode: no

- name: "Test for domain group"
command: grep '\s*\[domain\/[^]]*]' /etc/sssd/sssd.conf
register: test_grep_domain
failed_when: test_grep_domain.rc not in [0, 1]
changed_when: False
failed_when: false
changed_when: false
check_mode: no

- name: "Add default domain group and set {{{ parameter }}} in sssd configuration (if no domain there)"
Expand Down Expand Up @@ -748,7 +748,7 @@ The following macro remediates Audit syscall rule in :code:`/etc/audit/audit.rul
cmd: authselect check
register: result_authselect_check_cmd
changed_when: false
failed_when: result_authselect_check_cmd.rc not in [0, 3, 4]
failed_when: false

- name: '{{{ rule_title }}} - Informative message based on the authselect integrity check result'
ansible.builtin.assert:
Expand Down