From ed7b1f7d9ea46ac94384fb1fc525303a59fc0e3e Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Mon, 21 Jul 2014 23:24:21 +0000 Subject: [PATCH] Adjust playbook --- .../hosts/koschei.cloud.fedoraproject.org.yml | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/playbooks/hosts/koschei.cloud.fedoraproject.org.yml b/playbooks/hosts/koschei.cloud.fedoraproject.org.yml index 75249dc764..0790d8e7c7 100644 --- a/playbooks/hosts/koschei.cloud.fedoraproject.org.yml +++ b/playbooks/hosts/koschei.cloud.fedoraproject.org.yml @@ -15,12 +15,30 @@ hosts: koschei.cloud.fedoraproject.org user: root gather_facts: True + user: fedora + sudo: yes - vars_files: + vars_files: - /srv/web/infra/ansible/vars/global.yml - "{{ private }}/vars.yml" - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + tasks: + - name: growpart /dev/vda1 partition (/) to full size + action: command growpart /dev/vda 1 + register: growpart + always_run: true + changed_when: "growpart.rc != 1" + failed_when: growpart.rc == 2 + + - name: resize the /dev/vda 1 fs + action: command resize2fs /dev/vda1 + when: growpart.rc == 0 + + - name: put the mbr back - b/c the resize breaks booting otherwise + action: shell cat /usr/share/syslinux/mbr.bin > /dev/vda + when: growpart.rc == 0 + tasks: - include: "{{ tasks }}/cloud_setup_basic.yml" - include: "{{ tasks }}/postfix_basic.yml"