Merge "Updated to use the openstack-ansible-tests repo"
This commit is contained in:
commit
94afa972a0
|
@ -61,3 +61,6 @@ releasenotes/build
|
|||
|
||||
# Vagrant testing artifacts
|
||||
.vagrant
|
||||
|
||||
# Test playbooks brought in by tox
|
||||
tests/playbooks
|
||||
|
|
|
@ -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"
|
|
@ -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 }}"
|
||||
|
|
6
tox.ini
6
tox.ini
|
@ -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 =
|
||||
|
|
Loading…
Reference in New Issue