From b59513744f5de399fd4cb319bd0fd0d75c8b17fe Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Fri, 19 Jun 2015 15:09:45 -0400 Subject: [PATCH] Individual playbook for creating a test VM Addition of a individual playbook geared for the creation of a local testvm to be used by testing. Change-Id: I3c0a49336c05394f8152126584430bcc218384b0 --- playbooks/test-bifrost-create-vm.yaml | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 playbooks/test-bifrost-create-vm.yaml diff --git a/playbooks/test-bifrost-create-vm.yaml b/playbooks/test-bifrost-create-vm.yaml new file mode 100644 index 000000000..5be758ac1 --- /dev/null +++ b/playbooks/test-bifrost-create-vm.yaml @@ -0,0 +1,28 @@ +# Create a default VM +--- +- hosts: localhost + connection: local + name: "Executes install, enrollment, and testing in one playbook" + sudo: yes + gather_facts: yes + pre_tasks: + - name: "Set default baremetal.csv file if not already defined" + set_fact: + baremetal_csv_file: "/tmp/baremetal.csv" + when: baremetal_csv_file is not defined + - name: "Set ci_testing flag if a list of changes are found in the environment variables" + set_fact: + ci_testing: true + when: lookup('env', 'ZUUL_CHANGES') != "" + - name: "Set ci_testing_zuul if it appears we are running in upstream OpenStack CI" + set_fact: + ci_testing_zuul: true + when: "'bare-trusty' in ansible_hostname" + - name: "Collect process list if running in OpenStack CI" + command: ps aux + when: ci_testing_zuul is defined + - name: "Collect list of listening network sockets if running in OpenStack CI" + shell: netstat -apn|grep LISTEN + when: ci_testing_zuul is defined + roles: + - role: bifrost-create-vm-nodes