Skip to content

Commit

Permalink
Merge pull request #406 from konstruktoid/grps
Browse files Browse the repository at this point in the history
correct grep exit codes
  • Loading branch information
konstruktoid authored Oct 3, 2023
2 parents 083769f + 31116d8 commit 51f33b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tasks/post.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
set -o pipefail
grubby --info="/boot/vmlinuz-$(uname -r)" | grep "^args.*{{ grub_audit_cmdline }} {{ grub_audit_backlog_cmdline }}"
changed_when: false
failed_when: false
failed_when: audit_grubenv.rc > 1
args:
executable: /bin/bash
register: audit_grubenv
Expand All @@ -45,8 +45,8 @@
- name: Stat Debian auditd GRUB settings
become: true
ansible.builtin.shell: grep "linux.*{{ grub_audit_cmdline }} {{ grub_audit_backlog_cmdline }}" /boot/grub/grub.cfg
changed_when: audit_grub_cfg.rc != 0
failed_when: audit_grub_cfg.rc != 0
changed_when: false
failed_when: audit_grub_cfg.rc > 1
register: audit_grub_cfg
when: ansible_os_family == "Debian"
tags:
Expand Down

0 comments on commit 51f33b6

Please sign in to comment.