Skip to content

Commit

Permalink
Fix growroot LVM check
Browse files Browse the repository at this point in the history
``grep -q`` always returns rc 141 [1], so the check will never pass.
Send the output to /dev/null so we capture the correct return code
from grep.

[1] https://stackoverflow.com/questions/19120263/why-exit-code-141-with-grep-q
  • Loading branch information
MoteHue committed Jan 15, 2025
1 parent 4a55d94 commit a4965df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion etc/kayobe/ansible/growroot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
- name: Check LVM status
ansible.builtin.shell:
executable: "/bin/bash"
cmd: set -o pipefail && vgdisplay | grep -q lvm2
cmd: set -o pipefail && vgdisplay | grep lvm2 >> /dev/null
changed_when: false
failed_when: false
check_mode: false
Expand Down

0 comments on commit a4965df

Please sign in to comment.