Merge "Updated to use the openstack-ansible-tests repo"

This commit is contained in:
Jenkins 2016-09-06 18:38:08 +00:00 committed by Gerrit Code Review
commit 94afa972a0
4 changed files with 28 additions and 12 deletions

3
.gitignore vendored
View File

@ -61,3 +61,6 @@ releasenotes/build
# Vagrant testing artifacts
.vagrant
# Test playbooks brought in by tox
tests/playbooks

17
tests/group_vars/all.yml Normal file
View File

@ -0,0 +1,17 @@
---
# Copyright 2016, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
global_environment_variables:
PATH: "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

View File

@ -13,21 +13,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- include: "playbooks/test-install-openstack-hosts.yml"
- name: Playbook for role testing
hosts: localhost
connection: local
gather_facts: true
pre_tasks:
- name: First ensure apt cache is always refreshed
apt:
update_cache: yes
when:
- ansible_pkg_mgr == 'apt'
roles:
- role: "{{ rolename | basename }}"
global_environment_variables:
PATH: "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
post_tasks:
tasks:
- name: Open modules file
slurp:
src: "{{ openstask_host_module_file }}"

View File

@ -120,7 +120,11 @@ commands =
ansible-galaxy install \
--role-file={toxinidir}/tests/ansible-role-requirements.yml \
--force
rm -rf {homedir}/.ansible/roles/openstack_hosts
bash -c "ln -s {toxinidir} {homedir}/.ansible/roles/openstack_hosts"
rm -rf {toxinidir}/tests/playbooks
git clone https://git.openstack.org/openstack/openstack-ansible-tests \
{toxinidir}/tests/playbooks
[testenv:ansible-syntax]
deps =