You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
663 B

  1. ---
  2. # Running growpart seems to be only required on Azure, as other Cloud Providers do this at boot time
  3. - name: install growpart
  4. package: name=cloud-utils-growpart state=latest
  5. - name: check if growpart needs to be run
  6. command: growpart -N /dev/sda 1
  7. failed_when: False
  8. changed_when: "'NOCHANGE:' not in growpart_needed.stdout"
  9. register: growpart_needed
  10. - name: check fs type
  11. command: file -Ls /dev/sda1
  12. changed_when: False
  13. register: fs_type
  14. - name: run growpart
  15. command: growpart /dev/sda 1
  16. when: growpart_needed.changed
  17. - name: run xfs_growfs
  18. command: xfs_growfs /dev/sda1
  19. when: growpart_needed.changed and 'XFS' in fs_type.stdout