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.

26 lines
673 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:
  5. name: cloud-utils-growpart
  6. state: latest
  7. - name: check if growpart needs to be run
  8. command: growpart -N /dev/sda 1
  9. failed_when: False
  10. changed_when: "'NOCHANGE:' not in growpart_needed.stdout"
  11. register: growpart_needed
  12. - name: check fs type
  13. command: file -Ls /dev/sda1
  14. changed_when: False
  15. register: fs_type
  16. - name: run growpart
  17. command: growpart /dev/sda 1
  18. when: growpart_needed.changed
  19. - name: run xfs_growfs
  20. command: xfs_growfs /dev/sda1
  21. when: growpart_needed.changed and 'XFS' in fs_type.stdout