2013-02-26 20:04:20 +00:00
|
|
|
- name: add infra repo
|
|
|
|
action: get_url url=http://infrastructure.fedoraproject.org/el/infrastructure.repo dest=/etc/yum.repos.d/
|
2013-09-26 17:56:22 +00:00
|
|
|
when: is_rhel == 'True'
|
2013-05-21 20:15:34 +00:00
|
|
|
tags:
|
|
|
|
- config
|
2013-04-23 00:21:32 +00:00
|
|
|
|
2013-02-26 20:04:20 +00:00
|
|
|
- name: install cloud-utils
|
|
|
|
action: yum name=cloud-utils state=present
|
2013-05-21 20:15:34 +00:00
|
|
|
tags:
|
|
|
|
- packages
|
2013-02-26 20:04:20 +00:00
|
|
|
|
|
|
|
- name: growpart the second partition (/) to full size
|
2014-01-22 21:50:52 +00:00
|
|
|
command: growpart /dev/vda 2
|
2013-02-26 20:04:20 +00:00
|
|
|
register: growpart
|
2014-01-01 20:41:26 +00:00
|
|
|
always_run: true
|
2014-01-07 19:54:00 +00:00
|
|
|
changed_when: "growpart.rc != 1"
|
2014-01-22 21:51:53 +00:00
|
|
|
failed_when: growpart.rc == 2
|
2013-02-26 20:04:20 +00:00
|
|
|
|
|
|
|
- name: reboot the box
|
2014-01-22 21:50:52 +00:00
|
|
|
command: /sbin/reboot
|
2014-01-01 19:39:48 +00:00
|
|
|
when: growpart.rc == 0
|
2013-03-04 22:11:51 +00:00
|
|
|
ignore_errors: true
|
2013-02-26 20:04:20 +00:00
|
|
|
|
|
|
|
- name: wait for it to come back (should be quick)
|
2014-01-01 19:15:11 +00:00
|
|
|
local_action: wait_for host={{ inventory_hostname }} port=22 delay=10 timeout=120
|
2014-01-01 19:39:48 +00:00
|
|
|
when: growpart.rc == 0
|
2013-02-26 20:04:20 +00:00
|
|
|
|
|
|
|
- name: resize the /dev/vda 2 fs
|
2014-01-22 21:50:52 +00:00
|
|
|
command: resize2fs /dev/vda2
|
2014-01-01 19:39:48 +00:00
|
|
|
when: growpart.rc == 0
|