ansible/tasks/growroot_cloud.yml
Kevin Fenzi af2f786498 Revert "Conditionalize this for fedora 22 which has only dnf, no yum."
Turns out we don't have facts gathered here, so this won't work.
Also, in the new cloud we don't need this task at all.

This reverts commit 69d865e7ff.
2015-06-02 13:44:32 +00:00

30 lines
816 B
YAML

- name: add infra repo
action: get_url url=http://infrastructure.fedoraproject.org/el/infrastructure.repo dest=/etc/yum.repos.d/
when: is_rhel is defined
tags:
- config
- name: install cloud-utils
action: yum name=cloud-utils state=present
tags:
- packages
- name: growpart the second partition (/) to full size
command: growpart /dev/vda 2
register: growpart
always_run: true
changed_when: "growpart.rc != 1"
failed_when: growpart.rc == 2
- name: reboot the box
command: /sbin/reboot
when: growpart.rc == 0
ignore_errors: true
- name: wait for it to come back (should be quick)
local_action: wait_for host={{ inventory_hostname }} port=22 delay=10 timeout=120
when: growpart.rc == 0
- name: resize the /dev/vda 2 fs
command: resize2fs /dev/vda2
when: growpart.rc == 0