Merge "Change Bifrost over to using dynamic inventory"

This commit is contained in:
Jenkins 2015-06-26 19:48:59 +00:00 committed by Gerrit Code Review
commit 39e1a06403
2 changed files with 22 additions and 2 deletions

View File

@ -12,6 +12,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
# TODO(TheJulia) This seems like it needs to be refactored if we are
# needing to determine if the host is a CI host. Since we have specific
# logic for identifying the SSH key, it is necessary for now.
# Possible refactor path, fact collection role that feeds the variables
# into the inventory if they are not already defined, which seems
# to make the most sense in the long run.
- 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: "Determine if OpenStack CI is missing an SSH key"
stat: path={{ssh_public_key_path}}
register: test_ssh_public_key_path

View File

@ -22,10 +22,20 @@ cd $BIFROST_HOME/playbooks
# Perform a syntax check
ansible-playbook -vvvv -i inventory/localhost test-bifrost.yaml --syntax-check --list-tasks
# Syntax check of dynamic inventory test path
ansible-playbook -vvvv -i inventory/localhost test-bifrost-create-vm.yaml --syntax-check --list-tasks
ansible-playbook -vvvv -i inventory/localhost test-bifrost-dynamic.yaml --syntax-check --list-tasks
set +e
# Execute test playbook
ansible-playbook -vvvv -i inventory/localhost test-bifrost.yaml -e use_cirros=true -e testing_user=cirros
# Create the test VM
ansible-playbook -vvvv -i inventory/localhost test-bifrost-create-vm.yaml
# Set BIFROST_INVENTORY_SOURCE
export BIFROST_INVENTORY_SOURCE=/tmp/baremetal.csv
# Execute the installation and VM startup test.
ansible-playbook -vvvv -i inventory/bifrost_inventory.py test-bifrost-dynamic.yaml -e use_cirros=true -e testing_user=cirros
EXITCODE=$?
if [ $EXITCODE != 0 ]; then
echo "****************************"