15e1c3f22e
These changes allow the various playbooks to be executed by Ansible 1.9.x and 2.0. This was necessary as 2.0 has a number of changes to the YAML processor, and certain ways of doing things have naturally had to change. - Removed pass-through variable when a role is explicitly defined with variables passed through to it as updated yaml parser fails to handle appropriately. - Defined a default dib_packages variable of an empty string. - Changed stray boolean compare to use an is defined check as the the parser in Ansible 2.0 does not equate undefined to false. - Explicitly defined the testing_user for the syntax check as the check fails without it. - Revised MySQL module syntax usage to be compatible between Ansible 1.9.x and 2.0 development branches. - Updated some conditionals making string compares with lookups which is apparently problematic in Ansible 2.0. Depends-On: I9d5fa719793896cce00a69dafba738755b45b068 Depends-On: I23e902c8637e142fba23d71467225d48ee265253 Change-Id: I4fec7f44dd9d591388f345b3f449cb44b8e50744 Closes-Bug: 1469862
29 lines
1.0 KiB
YAML
29 lines
1.0 KiB
YAML
# 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') | length > 0
|
|
- 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
|