main.yml 489 B

123456789101112131415161718
  1. ---
  2. - name: Ensure growpart is installed
  3. package:
  4. name: cloud-utils-growpart
  5. state: present
  6. register: result
  7. until: result is succeeded
  8. - name: Grow the partitions
  9. command: "growpart {{oep_drive}} {{oep_partition}}"
  10. - name: Expand the filesystem - xfs
  11. command: "xfs_growfs {{oep_drive}}{{oep_partition}}"
  12. when: oep_file_system == "xfs"
  13. - name: Expand the filesystem - ext(2,3,4)
  14. command: "resize2fs {{oep_drive}}{{oep_partition}}"
  15. when: oep_file_system == "ext"