Fail when ansible-galaxy returns error

Remove the --ignore-errors flag from the ansible-galaxy command used to
pull in the roles required by the project. If a role fails to be
installed, ignoring the error only moves the failure from
bootstrap-ansible.sh to the playbooks.

Adjust the ordering of the roles in the requirements file so that
dependencies are installed before they are required. This is necessary
because the roles are not on Ansible Galaxy.

Modify tox.ini so that the functional testing does not ignore errors.

Change-Id: Id68affada5cf2380b0388d45a9baf6b4839824c7
This commit is contained in:
git-harry 2016-03-14 10:07:23 +00:00 committed by Kevin Carter (cloudnull)
parent ea2fe1e89b
commit 871d4b9c32
3 changed files with 9 additions and 11 deletions

View File

@ -2,6 +2,14 @@
src: https://git.openstack.org/openstack/openstack-ansible-apt_package_pinning
scm: git
version: master
- name: pip_install
src: https://git.openstack.org/openstack/openstack-ansible-pip_install
scm: git
version: master
- name: pip_lock_down
src: https://git.openstack.org/openstack/openstack-ansible-pip_lock_down
scm: git
version: master
- name: galera_client
src: https://git.openstack.org/openstack/openstack-ansible-galera_client
scm: git
@ -85,14 +93,6 @@
src: https://git.openstack.org/openstack/openstack-ansible-os_tempest
scm: git
version: master
- name: pip_lock_down
src: https://git.openstack.org/openstack/openstack-ansible-pip_lock_down
scm: git
version: master
- name: pip_install
src: https://git.openstack.org/openstack/openstack-ansible-pip_install
scm: git
version: master
- name: plugins
src: https://git.openstack.org/openstack/openstack-ansible-plugins
path: /etc/ansible

View File

@ -86,7 +86,6 @@ pip2 install $PIP_OPTS "${ANSIBLE_WORKING_DIR}" || pip install $PIP_OPTS "${ANSI
if [ -f "${ANSIBLE_ROLE_FILE}" ];then
# Pull all required roles.
ansible-galaxy install --role-file=${ANSIBLE_ROLE_FILE} \
--ignore-errors \
--force
fi

View File

@ -82,7 +82,6 @@ commands =
ansible-galaxy install \
--role-file={envtmpdir}/ansible/ansible-role-requirements.yml \
--roles-path={envtmpdir}/ansible/roles \
--ignore-errors \
--force; \
ansible-playbook -i 'localhost ansible-connection=local,' \
--syntax-check \
@ -99,4 +98,4 @@ commands =
{[testenv:bashate]commands}
{[testenv:ansible-lint]commands}
{[testenv:ansible-syntax]commands}
{[testenv:inventory]commands}
{[testenv:inventory]commands}