Cleanup integration test inventory. (#50753)
* Move var_blending test inventory into test. * Remove Amazon specific inventory entry for tests. * Remove Azure specific inventory entry for tests. * Move var_precedence test inventory into test. * Move unicode test inventory into test. * Remove unused inventory entry. * Move gathering_facts test inventory into test. * Move delegate_to test inventory into test. * Clean up inventory for binary_modules test. * Clean up integration test inventory.
This commit is contained in:
parent
476a7fc27d
commit
e5094e8071
17 changed files with 72 additions and 84 deletions
|
@ -1,52 +1,8 @@
|
|||
[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 host_var_role_name=role2
|
||||
# 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
|
||||
# Do not put test specific entries in this inventory file.
|
||||
# For script based test targets (using runme.sh) put the inventory file in the test's directory instead.
|
||||
|
||||
[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
|
||||
[testgroup]
|
||||
testhost ansible_connection=local
|
||||
|
||||
[aci:vars]
|
||||
aci_hostname=your-apic-1
|
||||
|
@ -69,9 +25,3 @@ msc_use_proxy=no
|
|||
|
||||
[msc]
|
||||
localhost ansible_ssh_host=127.0.0.1 ansible_connection=local
|
||||
|
||||
[amazon]
|
||||
localhost ansible_ssh_host=127.0.0.1 ansible_connection=local
|
||||
|
||||
[azure]
|
||||
localhost ansible_ssh_host=127.0.0.1 ansible_connection=local
|
||||
|
|
|
@ -23,6 +23,6 @@ ansible_winrm_server_cert_validation=ignore
|
|||
[winrm:children]
|
||||
windows
|
||||
|
||||
# support winrm binary module tests (temporary solution)
|
||||
[testhost_binary_modules:children]
|
||||
# support tests that target testhost
|
||||
[testhost:children]
|
||||
windows
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
- hosts: testhost_binary_modules
|
||||
- hosts: testhost
|
||||
tasks:
|
||||
- debug: var=ansible_system
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
- hosts: testhost_binary_modules
|
||||
- hosts: testhost
|
||||
roles:
|
||||
- role: test_binary_modules
|
||||
tags:
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
shippable/posix/group3
|
||||
needs/ssh
|
||||
|
|
5
test/integration/targets/delegate_to/inventory
Normal file
5
test/integration/targets/delegate_to/inventory
Normal file
|
@ -0,0 +1,5 @@
|
|||
[local]
|
||||
testhost ansible_connection=local
|
||||
testhost2 ansible_connection=local
|
||||
testhost3 ansible_ssh_host=127.0.0.3
|
||||
testhost4 ansible_ssh_host=127.0.0.4
|
|
@ -3,14 +3,14 @@
|
|||
set -eux
|
||||
|
||||
ANSIBLE_SSH_ARGS='-C -o ControlMaster=auto -o ControlPersist=60s -o UserKnownHostsFile=/dev/null' \
|
||||
ANSIBLE_HOST_KEY_CHECKING=false ansible-playbook test_delegate_to.yml -i ../../inventory -v "$@"
|
||||
ANSIBLE_HOST_KEY_CHECKING=false ansible-playbook test_delegate_to.yml -i inventory -v "$@"
|
||||
|
||||
ansible-playbook test_loop_control.yml -v "$@"
|
||||
|
||||
ansible-playbook test_delegate_to_loop_randomness.yml -v "$@"
|
||||
|
||||
ansible-playbook delegate_and_nolog.yml -i ../../inventory -v "$@"
|
||||
ansible-playbook delegate_and_nolog.yml -i inventory -v "$@"
|
||||
|
||||
ansible-playbook delegate_facts_block.yml -i ../../inventory -v "$@"
|
||||
ansible-playbook delegate_facts_block.yml -i inventory -v "$@"
|
||||
|
||||
ansible-playbook test_delegate_to_loop_caching.yml -i ../../inventory -v "$@"
|
||||
ansible-playbook test_delegate_to_loop_caching.yml -i inventory -v "$@"
|
||||
|
|
2
test/integration/targets/gathering_facts/inventory
Normal file
2
test/integration/targets/gathering_facts/inventory
Normal file
|
@ -0,0 +1,2 @@
|
|||
[local]
|
||||
facthost[0:25] ansible_connection=local
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
set -eux
|
||||
|
||||
# ANSIBLE_CACHE_PLUGINS=cache_plugins/ ANSIBLE_CACHE_PLUGIN=none ansible-playbook test_gathering_facts.yml -i ../../inventory -v "$@"
|
||||
ansible-playbook test_gathering_facts.yml -i ../../inventory -v "$@"
|
||||
#ANSIBLE_CACHE_PLUGIN=base ansible-playbook test_gathering_facts.yml -i ../../inventory -v "$@"
|
||||
# ANSIBLE_CACHE_PLUGINS=cache_plugins/ ANSIBLE_CACHE_PLUGIN=none ansible-playbook test_gathering_facts.yml -i inventory -v "$@"
|
||||
ansible-playbook test_gathering_facts.yml -i inventory -v "$@"
|
||||
# ANSIBLE_CACHE_PLUGIN=base ansible-playbook test_gathering_facts.yml -i inventory -v "$@"
|
||||
|
||||
ANSIBLE_GATHERING=smart ansible-playbook test_run_once.yml -i ../../inventory -v "$@"
|
||||
ANSIBLE_GATHERING=smart ansible-playbook test_run_once.yml -i inventory -v "$@"
|
||||
|
|
5
test/integration/targets/unicode/inventory
Normal file
5
test/integration/targets/unicode/inventory
Normal file
|
@ -0,0 +1,5 @@
|
|||
[local]
|
||||
testhost ansible_connection=local
|
||||
|
||||
[all:vars]
|
||||
unicode_host_var=CaféEñyei
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
set -eux
|
||||
|
||||
ansible-playbook unicode.yml -i ../../inventory -v -e 'extra_var=café' "$@"
|
||||
ansible-playbook unicode.yml -i inventory -v -e 'extra_var=café' "$@"
|
||||
# Test the start-at-task flag #9571
|
||||
ansible-playbook unicode.yml -i ../../inventory -v --start-at-task '*¶' -e 'start_at_task=True' "$@"
|
||||
ansible-playbook unicode.yml -i inventory -v --start-at-task '*¶' -e 'start_at_task=True' "$@"
|
||||
|
|
26
test/integration/targets/var_blending/inventory
Normal file
26
test/integration/targets/var_blending/inventory
Normal file
|
@ -0,0 +1,26 @@
|
|||
[local]
|
||||
testhost ansible_connection=local
|
||||
testhost2 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
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
set -eux
|
||||
|
||||
ansible-playbook test_var_blending.yml -i ../../inventory -e @integration_config.yml -v "$@"
|
||||
ansible-playbook test_var_blending.yml -i inventory -e @integration_config.yml -v "$@"
|
||||
|
|
13
test/integration/targets/var_precedence/inventory
Normal file
13
test/integration/targets/var_precedence/inventory
Normal file
|
@ -0,0 +1,13 @@
|
|||
[local]
|
||||
testhost ansible_connection=local
|
||||
|
||||
[all:vars]
|
||||
extra_var_override=FROM_INVENTORY
|
||||
inven_var=inventory_var
|
||||
|
||||
[inven_overridehosts]
|
||||
invenoverride ansible_connection=local
|
||||
|
||||
[inven_overridehosts:vars]
|
||||
foo=foo
|
||||
var_dir=vars
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
set -eux
|
||||
|
||||
ansible-playbook test_var_precedence.yml -i ../../inventory -v "$@" \
|
||||
ansible-playbook test_var_precedence.yml -i inventory -v "$@" \
|
||||
-e 'extra_var=extra_var' \
|
||||
-e 'extra_var_override=extra_var_override'
|
||||
|
||||
|
|
|
@ -103,10 +103,3 @@ class AwsCloudEnvironment(CloudEnvironment):
|
|||
if not tries and self.managed:
|
||||
display.notice('If %s failed due to permissions, the IAM test policy may need to be updated. '
|
||||
'For help, consult @mattclay or @gundalow on GitHub or #ansible-devel on IRC.' % target.name)
|
||||
|
||||
@property
|
||||
def inventory_hosts(self):
|
||||
"""
|
||||
:rtype: str | None
|
||||
"""
|
||||
return 'amazon'
|
||||
|
|
|
@ -161,13 +161,6 @@ class AzureCloudEnvironment(CloudEnvironment):
|
|||
display.notice('If %s failed due to permissions, the test policy may need to be updated. '
|
||||
'For help, consult @mattclay or @gundalow on GitHub or #ansible-devel on IRC.' % target.name)
|
||||
|
||||
@property
|
||||
def inventory_hosts(self):
|
||||
"""
|
||||
:rtype: str | None
|
||||
"""
|
||||
return 'azure'
|
||||
|
||||
|
||||
def get_config(config_path):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue