Skip to content

Commit

Permalink
Merge pull request #10427 from marcusburghardt/fix_10423
Browse files Browse the repository at this point in the history
Fix changes in Ansible tasks not expected to fail
  • Loading branch information
jan-cerny authored Apr 5, 2023
2 parents 7a9bb5f + 2db4528 commit f4d8d9b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
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

0 comments on commit f4d8d9b

Please sign in to comment.