2016-08-08 19:36:31 +00:00
|
|
|
- name: add infra repo
|
2016-01-06 21:25:10 +00:00
|
|
|
get_url: url=http://infrastructure.fedoraproject.org/el/infrastructure.repo dest=/etc/yum.repos.d/
|
2014-03-04 18:47:58 +00:00
|
|
|
when: is_rhel is defined
|
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
|
2017-10-09 00:37:39 +02:00
|
|
|
package: 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
|
2016-11-01 16:29:49 +00:00
|
|
|
check_mode: no
|
2014-01-07 19:54:00 +00:00
|
|
|
changed_when: "growpart.rc != 1"
|
2015-11-30 07:39:09 +01:00
|
|
|
#failed_when: growpart.rc == 2
|
2015-11-30 08:00:08 +01:00
|
|
|
ignore_errors: true
|
2016-08-08 19:36:31 +00:00
|
|
|
|
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
|