mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Add a partial test of variable blending to the test infrastructure.
This commit is contained in:
parent
701af19fad
commit
ddf91a3d6f
3 changed files with 40 additions and 0 deletions
|
@ -2,3 +2,8 @@
|
|||
output_dir: ~/ansible_testing
|
||||
non_root_test_user: ansible
|
||||
pip_test_package: epdb
|
||||
|
||||
# variables used in precedence tests, here passed to -e
|
||||
etest: 'from -e'
|
||||
|
||||
|
||||
|
|
|
@ -1,2 +1,27 @@
|
|||
[local]
|
||||
testhost ansible_ssh_host=127.0.0.1 ansible_connection=local
|
||||
testhost2 ansible_ssh_host=127.0.0.1 ansible_connection=local
|
||||
|
||||
# the following inline declarations are accompanied
|
||||
# by (preferred) group_vars/ and host_vars/ variables
|
||||
# and are used in testing of variable precedence
|
||||
|
||||
[arbitrary_parent:children]
|
||||
local
|
||||
|
||||
[local:vars]
|
||||
parent_var=6000
|
||||
groups_tree_var=5000
|
||||
|
||||
[arbitrary_parent:vars]
|
||||
groups_tree_var=4000
|
||||
overridden_in_parent=1000
|
||||
|
||||
[arbitrary_grandparent:children]
|
||||
arbitrary_parent
|
||||
|
||||
[arbitrary_grandparent:vars]
|
||||
groups_tree_var=3000
|
||||
grandparent_var=2000
|
||||
overridden_in_parent=2000
|
||||
|
||||
|
|
|
@ -1,4 +1,13 @@
|
|||
- hosts: testhost
|
||||
|
||||
# these variables are defined here for variable blending tests only.
|
||||
# in general, define test variables in the role/rolenamevars/main.yml
|
||||
|
||||
vars_files:
|
||||
- vars_file.yml
|
||||
vars:
|
||||
vars_var: 123
|
||||
|
||||
gather_facts: True
|
||||
roles:
|
||||
- { role: test_copy, tags: test_copy }
|
||||
|
@ -11,4 +20,5 @@
|
|||
- { role: test_git, tags: test_git }
|
||||
- { role: test_hg, tags: test_hg }
|
||||
- { role: test_changed_when, tags: test_changed_when }
|
||||
- { role: test_var_blending, tags: test_var_blending }
|
||||
|
||||
|
|
Loading…
Reference in a new issue