From fa584a99172e3688bc0c0d5a644deaba6f0c3209 Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Fri, 27 Mar 2015 20:44:10 -0400 Subject: [PATCH] Changing testing to utilize role Changed the test-bifrost.yml playbook to utilize the basic vm creation role, and moved the vm creation script to the tools folder. --- README.rst | 4 ++-- test-bifrost.yaml | 17 ++--------------- create_vm_nodes.sh => tools/create_vm_nodes.sh | 0 3 files changed, 4 insertions(+), 17 deletions(-) rename create_vm_nodes.sh => tools/create_vm_nodes.sh (100%) diff --git a/README.rst b/README.rst index 3d3ef82b4..f45a6dc8f 100644 --- a/README.rst +++ b/README.rst @@ -174,8 +174,8 @@ will use this key to connect to the host machine and run virsh commands. #. Set ``testing`` to *true* in the ``inventory/group_vars/all`` file. #. You may need to adjust the value for ``ssh_public_key_path``. #. Run the install step, as documented above. -#. Run the ``create_vm_nodes.sh`` script. By default, it will create a single VM node. Read the documentation within the script to see how to create more than one. -#. The ``create_vm_nodes.sh`` script will output CSV entries that can be used for the enrollment step. You will need to create a CSV file with this output. +#. Run the ``tools/create_vm_nodes.sh`` script. By default, it will create a single VM node. Read the documentation within the script to see how to create more than one. +#. The ``tools/create_vm_nodes.sh`` script will output CSV entries that can be used for the enrollment step. You will need to create a CSV file with this output. #. Run the enrollment step, as documented above, using the CSV file you created in the previous step. #. Run the deployment step, as documented above. diff --git a/test-bifrost.yaml b/test-bifrost.yaml index be210dce1..fcc26e259 100644 --- a/test-bifrost.yaml +++ b/test-bifrost.yaml @@ -1,27 +1,14 @@ --- -- 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 }} state=present - 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" + when: baremetal_csv_file is not defined roles: + - role: bifrost-create-vm-nodes - role: ironic-install cleaning: false testing: true diff --git a/create_vm_nodes.sh b/tools/create_vm_nodes.sh similarity index 100% rename from create_vm_nodes.sh rename to tools/create_vm_nodes.sh