summaryrefslogtreecommitdiffstats
path: root/test/lib/ansible_test/_internal/executor.py
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2020-02-21 00:27:08 +0100
committerMatt Clay <matt@mystile.com>2020-02-22 03:31:40 +0100
commit482885e0c8ebc9554ae5eb81dce67253f64455f2 (patch)
tree61db45264e2687399ff3567ab461463f9b9520f2 /test/lib/ansible_test/_internal/executor.py
parentShow field instead of value (#59926) (diff)
downloadansible-482885e0c8ebc9554ae5eb81dce67253f64455f2.tar.xz
ansible-482885e0c8ebc9554ae5eb81dce67253f64455f2.zip
Fix network setup for collections in ansible-test.
Diffstat (limited to 'test/lib/ansible_test/_internal/executor.py')
-rw-r--r--test/lib/ansible_test/_internal/executor.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/lib/ansible_test/_internal/executor.py b/test/lib/ansible_test/_internal/executor.py
index b1e18f328f..3d1a1ab3c0 100644
--- a/test/lib/ansible_test/_internal/executor.py
+++ b/test/lib/ansible_test/_internal/executor.py
@@ -62,6 +62,7 @@ from .util import (
generate_pip_command,
find_python,
get_docker_completion,
+ get_network_settings,
get_remote_completion,
cmd_quote,
ANSIBLE_LIB_ROOT,
@@ -560,10 +561,12 @@ def network_inventory(remotes):
ansible_host=remote.connection.hostname,
ansible_user=remote.connection.username,
ansible_ssh_private_key_file=os.path.abspath(remote.ssh_key.key),
- ansible_network_os=remote.platform,
- ansible_connection='local'
)
+ settings = get_network_settings(remote.args, remote.platform, remote.version)
+
+ options.update(settings.inventory_vars)
+
groups[remote.platform].append(
'%s %s' % (
remote.name.replace('.', '-'),
@@ -1401,7 +1404,7 @@ def command_integration_role(args, target, start_at_task, test_dir, inventory_pa
win_output_dir=r'C:\ansible_testing',
))
elif isinstance(args, NetworkIntegrationConfig):
- hosts = target.name[:target.name.find('_')]
+ hosts = target.network_platform
gather_facts = False
else:
hosts = 'testhost'