diff --git a/tasks/growroot_cloud.yml b/tasks/growroot_cloud.yml index e5e15a1413..1a4e9e5637 100644 --- a/tasks/growroot_cloud.yml +++ b/tasks/growroot_cloud.yml @@ -10,14 +10,14 @@ - packages - name: growpart the second partition (/) to full size - action: command growpart /dev/vda 2 - ignore_errors: true + command: growpart /dev/vda 2 register: growpart always_run: true changed_when: "growpart.rc != 1" + failed_when: "growpart.rc = 2" - name: reboot the box - action: command /sbin/reboot + command: /sbin/reboot when: growpart.rc == 0 ignore_errors: true @@ -26,5 +26,5 @@ when: growpart.rc == 0 - name: resize the /dev/vda 2 fs - action: command resize2fs /dev/vda2 + command: resize2fs /dev/vda2 when: growpart.rc == 0