From e718a76561e4ea166083a554b1b1f377f967cf02 Mon Sep 17 00:00:00 2001 From: Laura Hild Date: Fri, 11 Aug 2023 13:54:16 -0400 Subject: [PATCH] Allow /dev/sda in addition to /dev/vda --- playbooks/resize_disk.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/resize_disk.yml b/playbooks/resize_disk.yml index 16bc7f35f..24705196f 100644 --- a/playbooks/resize_disk.yml +++ b/playbooks/resize_disk.yml @@ -22,7 +22,7 @@ when: '"ext4" in root_partition.stdout' - name: Extend partition - command: growpart /dev/vda {{ root_partition.stdout.split(' ')[0].replace('/dev/vda', '') }} + command: growpart {{ root_partition.stdout | regex_replace('^(/dev/[sv]da)(\d+) .+$', '\1 \2') }} register: growpart_output failed_when: - growpart_output.rc != 0