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

use failed_when:false for Ansible register: checks #11782

Merged
merged 1 commit into from
Apr 3, 2024
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 @@ -6,7 +6,7 @@
- name: "Test for domain group"
command: grep '^\s*\[domain\/[^]]*]' /etc/sssd/sssd.conf
register: test_grep_domain
ignore_errors: yes
failed_when: false
changed_when: False
check_mode: no

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- name: "Test for domain group"
command: grep '\s*\[domain\/[^]]*]' /etc/sssd/sssd.conf
register: test_grep_domain
ignore_errors: yes
failed_when: false
changed_when: False
check_mode: no

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- name: "Test for domain group"
command: grep '\s*\[domain\/[^]]*]' /etc/sssd/sssd.conf
register: test_grep_domain
ignore_errors: yes
failed_when: false
changed_when: False
check_mode: no

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- name: "Test for domain group"
command: grep '\s*\[domain\/[^]]*]' /etc/sssd/sssd.conf
register: test_grep_domain
ignore_errors: yes
failed_when: false
changed_when: False
check_mode: no

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
ansible.builtin.command:
cmd: semanage fcontext -a -t faillog_t "{{ var_accounts_passwords_pam_faillock_dir }}(/.*)?"
register: result_accounts_passwords_pam_faillock_dir_semanage
ignore_errors: yes
failed_when: false
changed_when:
- result_accounts_passwords_pam_faillock_dir_semanage.rc == 0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- name: "{{{ rule_title }}} - Check to See the Current Status of FIPS Mode"
ansible.builtin.command: /usr/bin/fips-mode-setup --check
register: is_fips_enabled
ignore_errors: yes
failed_when: false
changed_when: false

- name: "{{{ rule_title }}} - Enable FIPS Mode"
Expand Down
Loading