Skip to content

Commit e718a76

Browse files
quartsizeehelms
authored andcommitted
Allow /dev/sda in addition to /dev/vda
1 parent 019200f commit e718a76

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

playbooks/resize_disk.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
when: '"ext4" in root_partition.stdout'
2323

2424
- name: Extend partition
25-
command: growpart /dev/vda {{ root_partition.stdout.split(' ')[0].replace('/dev/vda', '') }}
25+
command: growpart {{ root_partition.stdout | regex_replace('^(/dev/[sv]da)(\d+) .+$', '\1 \2') }}
2626
register: growpart_output
2727
failed_when:
2828
- growpart_output.rc != 0

0 commit comments

Comments
 (0)