diff --git a/tests/test_check.yml b/tests/test_check.yml new file mode 100644 index 00000000..2f3e8723 --- /dev/null +++ b/tests/test_check.yml @@ -0,0 +1,19 @@ +--- +# Copyright 2015, 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. + +- name: Playbook for role testing (check mode) + hosts: localhost + roles: + - role: "{{ rolename }}" diff --git a/tox.ini b/tox.ini index ebefaa2d..369f9960 100644 --- a/tox.ini +++ b/tox.ini @@ -87,6 +87,13 @@ commands = rm -rf {homedir}/.ansible git clone https://git.openstack.org/openstack/openstack-ansible-plugins \ {homedir}/.ansible/plugins + ansible-playbook --check \ + -i {toxinidir}/tests/inventory \ + --syntax-check \ + --list-tasks \ + -e "rolename={toxinidir}" \ + -t ssh \ + {toxinidir}/tests/test_check.yml ansible-playbook -i {toxinidir}/tests/inventory \ --syntax-check \ --list-tasks \ @@ -107,6 +114,11 @@ commands = rm -rf {homedir}/.ansible git clone https://git.openstack.org/openstack/openstack-ansible-plugins \ {homedir}/.ansible/plugins + ansible-playbook --check \ + -i {toxinidir}/tests/inventory \ + -e "rolename={toxinidir}" \ + --skip-tag V-38462,V-38574,V-38674 \ + {toxinidir}/tests/test_check.yml ansible-playbook -i {toxinidir}/tests/inventory \ -e "rolename={toxinidir}" \ {toxinidir}/tests/test.yml \