experimental ppc64le playbook for copr builders
This commit is contained in:
parent
bad7deb209
commit
9eb810bb64
2 changed files with 36 additions and 0 deletions
30
roles/copr/backend/files/provision/builderpb_ppc64le.yml
Normal file
30
roles/copr/backend/files/provision/builderpb_ppc64le.yml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
- name: check/create instance
|
||||||
|
hosts: rh-power2.fit.vutbr.cz
|
||||||
|
gather_facts: False
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: spin up VM
|
||||||
|
command: /home/msuchy/bin/get-one-vm.sh
|
||||||
|
register: get_one
|
||||||
|
|
||||||
|
- debug: msg="{{ get_one.stdout }}"
|
||||||
|
|
||||||
|
- set_fact: builder_ip="{{ get_one.stdout|extract_ip_from_stdout() }}"
|
||||||
|
|
||||||
|
- name: wait for he host to be hot
|
||||||
|
local_action: wait_for host={{ builder_ip }} port=22 delay=1 timeout=600
|
||||||
|
|
||||||
|
- name: add builder ip to the special group
|
||||||
|
local_action: add_host hostname={{ builder_ip }} groupname=builder_temp_group
|
||||||
|
|
||||||
|
- name: provision builder
|
||||||
|
hosts: builder_temp_group
|
||||||
|
gather_facts: False
|
||||||
|
user: root
|
||||||
|
|
||||||
|
vars:
|
||||||
|
# pass this options if you need to create new base image from snapshot
|
||||||
|
#prepare_base_image: True
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- include: "provision_builder_tasks.yml"
|
|
@ -1,4 +1,10 @@
|
||||||
from novaclient.v1_1.client import Client
|
from novaclient.v1_1.client import Client
|
||||||
|
import re
|
||||||
|
|
||||||
|
def extract_ip_from_stdout(output):
|
||||||
|
match = re.search(r'IP=([^\{\}"]+)', result, re.MULTILINE)
|
||||||
|
if match:
|
||||||
|
return match.group(1)
|
||||||
|
|
||||||
|
|
||||||
def nova_result_to_builder_ip(nova_result, network_name):
|
def nova_result_to_builder_ip(nova_result, network_name):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue