ansible/test/integration/inventory
Sam Doran 10a8c6bc25 Integration tests for import/include (#33418)
* First pass at include_role tests

* Reorganize test structure

Do all import and include tests in a single target.

* Build out more tests and test with linear and free strategy for each type

* import_role tests

* Set target host for play test

* Basic import_playbook tests

* Basic import/include_tasks tests

* Add recursion test

* import_playbook tests

* Add import_playbook group_vars test

Issue #33177

* Additional group_var tests for import_playbook

* Enable recursion test

* More work on import_tasks

* Run all tests via run.sh, improve conditional tests, add never tag

Add never tag to certain failining tests and explicitly skip it for now until #34104 is merged. Some tasks need to remain commented out because they cause the entire play to fail and aren't skippable by tags because they are syntax and/or variable checks.

Improve test for whether or not a role was run based on a conditional. Since the [import|include]_role does not register a variable, use a variable that is set inside a role as a canary test for whether or not the role was run.

* Use a fail task rather than trigger a failure via bogus command

This should resolve the "unstable" test results.

* Import tag tests

Fix bug it tests where validate tasks weren't run on tag tests.
Add tests for task import/include with tags.

* Remove test for playbook group_var inheritance
2018-01-19 08:23:48 -08:00

55 lines
1.3 KiB
Text

[local]
testhost ansible_ssh_host=127.0.0.1 ansible_connection=local host_var_role_name=role3
testhost2 ansible_ssh_host=127.0.0.1 ansible_connection=local
# For testing delegate_to
testhost3 ansible_ssh_host=127.0.0.3
testhost4 ansible_ssh_host=127.0.0.4
# For testing fact gathering
facthost[0:25] ansible_host=127.0.0.1 ansible_connection=local
[binary_modules]
testhost_binary_modules ansible_host=127.0.0.1 ansible_connection=local
[local_group]
kube-pippin.knf.local
# the following inline declarations are accompanied
# by (preferred) group_vars/ and host_vars/ variables
# and are used in testing of variable precedence
[inven_overridehosts]
invenoverride ansible_ssh_host=127.0.0.1 ansible_connection=local
[all:vars]
extra_var_override=FROM_INVENTORY
inven_var=inventory_var
unicode_host_var=CaféEñyei
[inven_overridehosts:vars]
foo=foo
var_dir=vars
[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
[amazon]
localhost ansible_ssh_host=127.0.0.1 ansible_connection=local
[azure]
localhost ansible_ssh_host=127.0.0.1 ansible_connection=local