diff --git a/inventory/host_vars/209.132.184.142 b/inventory/host_vars/209.132.184.142 new file mode 100644 index 0000000000..382ccc7fc4 --- /dev/null +++ b/inventory/host_vars/209.132.184.142 @@ -0,0 +1,11 @@ +--- +instance_type: m1.xlarge +image: ami-00000013 +keypair: admin +security_group: webserver +zone: nova +hostbase: copr-be- +public_ip: 209.132.184.142 +root_auth_users: skvidal bkabrda +description: copr dispatcher and repo server +volumes: ['-d /dev/vdb vol-00000008', '-d /dev/vdc vol-00000007'] diff --git a/inventory/inventory b/inventory/inventory index 36f8a345fd..38c5e866ec 100644 --- a/inventory/inventory +++ b/inventory/inventory @@ -301,6 +301,8 @@ virthost-comm01.qa.fedoraproject.org 209.132.184.116 #logstash-dev.cloud.fedoraproject.org 209.132.184.120 +# copr-be on openstack +209.132.184.142 [twistedbots] #rhel6 twisted testbot - ticket 3537 diff --git a/playbooks/hosts/copr-be.cloud.fedoraproject.org.yml b/playbooks/hosts/copr-be.cloud.fedoraproject.org.yml index 0b87b02e35..383ea60f67 100644 --- a/playbooks/hosts/copr-be.cloud.fedoraproject.org.yml +++ b/playbooks/hosts/copr-be.cloud.fedoraproject.org.yml @@ -1,5 +1,5 @@ - name: check/create instance - hosts: 209.132.184.100 + hosts: 209.132.184.142 user: root gather_facts: False @@ -9,9 +9,10 @@ tasks: - include: $tasks/persistent_cloud.yml + - include: $tasks/growroot_cloud.yml - name: provision instance - hosts: 209.132.184.100 + hosts: 209.132.184.142 user: root gather_facts: True diff --git a/tasks/growroot_cloud.yml b/tasks/growroot_cloud.yml new file mode 100644 index 0000000000..3a739c1790 --- /dev/null +++ b/tasks/growroot_cloud.yml @@ -0,0 +1,22 @@ +- name: add infra repo + action: get_url url=http://infrastructure.fedoraproject.org/el/infrastructure.repo dest=/etc/yum.repos.d/ + +- name: install cloud-utils + action: yum name=cloud-utils state=present + +- name: growpart the second partition (/) to full size + action: command growpart /dev/vda 2 + ignore_errors: true + register: growpart + +- name: reboot the box + action: command /sbin/reboot + when_integer: ${growpart.rc} == 0 + +- name: wait for it to come back (should be quick) + local_action: wait_for host=${inventory_hostname} port=22 delay=10 timeout=120 + when_integer: ${growpart.rc} == 0 + +- name: resize the /dev/vda 2 fs + action: command resize2fs /dev/vda2 + when_integer: ${growpart.rc} == 0