openstack-ansible/tests/test-vars-overrides.yml
Jean-Philippe Evrard 6e1f3ca41c Extend tests vars overrides
This ensures that our group vars are well applied.
This check is useful to ensure the default inventory loads fine,
which would fail to apply group vars if it wasn't loading properly.

Change-Id: Idc1a2be1ee761ed01c3b54547fd3be804b0c0c33
2017-11-27 09:04:32 +00:00

49 lines
1.4 KiB
YAML

---
# Copyright 2017, 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: Ensuring group vars
hosts: "hosts"
gather_facts: no
connection: local
user: root
tasks:
- name: Ensuring existing group vars are well applied
assert:
that:
- "openstack_release is defined"
- name: Ensuring babar is well defined
assert:
that:
- "babar == 'elephant'"
- name: Ensuring lxc_hosts_package_state is well overriden
assert:
that:
- "lxc_hosts_package_state == 'present'"
- name: Ensuring host vars
hosts: localhost
gather_facts: no
connection: local
user: root
tasks:
- name: Ensuring tintin has milou
assert:
that:
- "tintin == 'milou'"
- name: Ensuring security_package_state is overriden
assert:
that:
- "security_package_state == 'present'"