ansible/test/integration/inventory

56 lines
1.3 KiB
Text
Raw Normal View History

[local]
testhost ansible_ssh_host=127.0.0.1 ansible_connection=local
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
Fix fact failures cause by ordering of collectors (#30777) * Fix fact failures cause by ordering of collectors Some fact collectors need info collected by other facts. (for ex, service_mgr needs to know 'ansible_system'). This info is passed to the Collector.collect method via the 'collected_facts' info. But, the order the fact collectors were running in is not a set order, so collectors like service_mgr could run before the PlatformFactCollect ('ansible_system', etc), so the 'ansible_system' fact would not exist yet. Depending on the collector and the deps, this can result in incorrect behavior and wrong or missing facts. To make the ordering of the collectors more consistent and predictable, the code that builds that list is now driven by the order of collectors in default_collectors.py, and the rest of the code tries to preserve it. * Flip the loops when building collector names iterate over the ordered default_collectors list selecting them for the final list in order instead of driving it from the unordered collector_names set. This lets the list returned by select_collector_classes to stay in the same order as default_collectors.collectors For collectors that have implicit deps on other fact collectors, the default collectors can be ordered to include those early. * default_collectors.py now uses a handful of sub lists of collectors that can be ordered in default_collectors.collectors. fixes #30753 fixes #30623 (cherry picked from commit 95abc1d82e4c40832c802253107ad3f9aeebc68d)
2017-09-28 14:56:18 +00:00
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
2014-11-26 18:55:37 +00:00
[all:vars]
extra_var_override=FROM_INVENTORY
inven_var=inventory_var
2015-03-12 03:58:21 +00:00
unicode_host_var=CaféEñyei
2014-11-26 18:55:37 +00:00
[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