c12s-kubespray/roles/kubernetes/preinstall/tasks/growpart-azure-centos-7.yml
Andrew Greenwood ca9ea097df Cleanup legacy syntax, spacing, files all to yml
Migrate older inline= syntax to pure yml syntax for module args as to be consistant with most of the rest of the tasks
Cleanup some spacing in various files
Rename some files named yaml to yml for consistancy
2017-02-17 16:22:34 -05:00

27 lines
673 B
YAML

---
# Running growpart seems to be only required on Azure, as other Cloud Providers do this at boot time
- name: install growpart
package:
name: cloud-utils-growpart
state: latest
- name: check if growpart needs to be run
command: growpart -N /dev/sda 1
failed_when: False
changed_when: "'NOCHANGE:' not in growpart_needed.stdout"
register: growpart_needed
- name: check fs type
command: file -Ls /dev/sda1
changed_when: False
register: fs_type
- name: run growpart
command: growpart /dev/sda 1
when: growpart_needed.changed
- name: run xfs_growfs
command: xfs_growfs /dev/sda1
when: growpart_needed.changed and 'XFS' in fs_type.stdout