bifrost/test-bifrost.yaml
Julia Kreger fe05724902 Adding basic testing of VMs with test-bifrost.yaml
Added two roles and appropriate changes to test-bifrost.yaml in
order to add the new hosts, typically which should be a single
virtual machine, to the running inventory, and then connect
to them and verify that the hostname is NOT ubuntu.

This is in support of issue #4.
2015-03-24 12:13:22 -04:00

47 lines
1.3 KiB
YAML

---
- hosts: localhost
connection: local
name: "Executes install, enrollment, and testing in one playbook"
sudo: yes
gather_facts: no
tasks:
- name: "Install testing packages"
apt: name={{ item }}
when: testing is defined and testing == true
with_items:
- libvirt-bin
- qemu-utils
- qemu-kvm
- sgabios
- hosts: localhost
connection: local
name: "Executes install, enrollment, and testing in one playbook"
sudo: yes
gather_facts: yes
pre_tasks:
- name: "Creating Baremetal CSV File"
shell: ./create_vm_nodes.sh |grep -v "CSV entries">/tmp/baremetal.csv
- set_fact: baremetal_csv_file="/tmp/baremetal.csv"
roles:
- ironic-install
- role: ironic-enroll
- role: ironic-deploy
- hosts: localhost
connection: local
name: "Executes install, enrollment, and testing in one playbook"
sudo: no
gather_facts: yes
roles:
- role: bifrost-configdrives
- role: bifrost-setup-nodes
- role: bifrost-prepare-for-test
# The testvm Host group is added by bifrost-prepare-for-test based
# on the contents of the CSV file.
- hosts: testvm
name: "Executes install, enrollment, and testing in one playbook"
sudo: no
gather_facts: yes
remote_user: ubuntu
roles:
- role: bifrost-test-vm