Skip to content

Instantly share code, notes, and snippets.

@strider
Created April 18, 2019 11:39
Show Gist options
  • Save strider/769997fd70eadf807ce3dbf5138e8b46 to your computer and use it in GitHub Desktop.
Save strider/769997fd70eadf807ce3dbf5138e8b46 to your computer and use it in GitHub Desktop.
run-validations.sh
#!/bin/bash
set -ux
## * Source in the undercloud credentials.
## ::
source /home/stack/stackrc
VALIDATIONS_BASEDIR="/usr/share/openstack-tripleo-validations"
# Use custom validation-specific formatter
export ANSIBLE_STDOUT_CALLBACK=validation_output
# Disable retry files to avoid messages like this:
# [Errno 13] Permission denied:
# u'/usr/share/openstack-tripleo-validations/validations/*.retry'
export ANSIBLE_RETRY_FILES_ENABLED=false
export ANSIBLE_KEEP_REMOTE_FILES=1
export ANSIBLE_CALLBACK_PLUGINS="${VALIDATIONS_BASEDIR}/callback_plugins"
export ANSIBLE_ROLES_PATH="${VALIDATIONS_BASEDIR}/roles"
export ANSIBLE_LOOKUP_PLUGINS="${VALIDATIONS_BASEDIR}/lookup_plugins"
export ANSIBLE_LIBRARY="${VALIDATIONS_BASEDIR}/library"
## * Generate ansible static inventory for tripleo-validations
## ::
ANSIBLE_INVENTORY_BIN=$(which tripleo-ansible-inventory)
export ANSIBLE_INVENTORY=${ANSIBLE_INVENTORY_BIN}
VALIDATION="${1:-}"
ansible-playbook -vvvv ${VALIDATIONS_BASEDIR}/playbooks/${VALIDATION}.yaml
## --stop_docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment