Skip to content

Commit a4965df

Browse files
committed
Fix growroot LVM check
``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
1 parent 4a55d94 commit a4965df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

etc/kayobe/ansible/growroot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
- name: Check LVM status
3333
ansible.builtin.shell:
3434
executable: "/bin/bash"
35-
cmd: set -o pipefail && vgdisplay | grep -q lvm2
35+
cmd: set -o pipefail && vgdisplay | grep lvm2 >> /dev/null
3636
changed_when: false
3737
failed_when: false
3838
check_mode: false

0 commit comments

Comments
 (0)