From a4965df74f67efe661ef6cfd61313ca43490a9a3 Mon Sep 17 00:00:00 2001 From: Matt Crees Date: Wed, 15 Jan 2025 12:54:23 +0000 Subject: [PATCH] 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 --- etc/kayobe/ansible/growroot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/kayobe/ansible/growroot.yml b/etc/kayobe/ansible/growroot.yml index 7930567e5..6525c2107 100644 --- a/etc/kayobe/ansible/growroot.yml +++ b/etc/kayobe/ansible/growroot.yml @@ -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