Skip to content

Commit

Permalink
Allow /dev/sda in addition to /dev/vda
Browse files Browse the repository at this point in the history
  • Loading branch information
quartsize committed Aug 11, 2023
1 parent 019200f commit 8f73949
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion playbooks/resize_disk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8f73949

Please sign in to comment.