From 2e5e8026cc0810edcb80a3f18adb8890012633b0 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Thu, 8 Sep 2022 15:26:22 -0700 Subject: [PATCH] Improve split integration test. (#78738) * Omit redundant fact gathering. * Add connection type to split test. * Add user info to split integration test. --- test/integration/targets/split/aliases | 1 + test/integration/targets/split/tasks/main.yml | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/test/integration/targets/split/aliases b/test/integration/targets/split/aliases index 87958830d5d..7907b284abc 100644 --- a/test/integration/targets/split/aliases +++ b/test/integration/targets/split/aliases @@ -1,2 +1,3 @@ context/target shippable/posix/group1 +gather_facts/no diff --git a/test/integration/targets/split/tasks/main.yml b/test/integration/targets/split/tasks/main.yml index 41f9a95df85..599ef415d79 100644 --- a/test/integration/targets/split/tasks/main.yml +++ b/test/integration/targets/split/tasks/main.yml @@ -13,15 +13,21 @@ - name: Build non-split status message set_fact: message: " + {{ control_host.ansible_facts.ansible_user_id }}@{{ control_host.ansible_facts.ansible_hostname }} on {{ control_host.ansible_facts.ansible_distribution }} {{ control_host.ansible_facts.ansible_distribution_version }} - {{ control_host.ansible_facts.ansible_python.executable }} ({{ control_host.ansible_facts.ansible_python_version }}) -> + {{ control_host.ansible_facts.ansible_python.executable }} ({{ control_host.ansible_facts.ansible_python_version }}) + --[ {{ ansible_connection }} ]--> + {{ managed_host.ansible_facts.ansible_user_id }} on {{ managed_host.ansible_facts.ansible_python.executable }} ({{ managed_host.ansible_facts.ansible_python_version }})" when: split is success and split.stat.exists - name: Build split status message set_fact: message: " + {{ control_host.ansible_facts.ansible_user_id }}@{{ control_host.ansible_facts.ansible_hostname }} on {{ control_host.ansible_facts.ansible_distribution }} {{ control_host.ansible_facts.ansible_distribution_version }} - {{ control_host.ansible_facts.ansible_python.executable }} ({{ control_host.ansible_facts.ansible_python_version }}) -> + {{ control_host.ansible_facts.ansible_python.executable }} ({{ control_host.ansible_facts.ansible_python_version }}) + --[ {{ ansible_connection }} ]--> + {{ managed_host.ansible_facts.ansible_user_id }}@{{ managed_host.ansible_facts.ansible_hostname }} on {{ managed_host.ansible_facts.ansible_distribution }} {{ managed_host.ansible_facts.ansible_distribution_version }} {{ managed_host.ansible_facts.ansible_python.executable }} ({{ managed_host.ansible_facts.ansible_python_version }})" when: split is not success or not split.stat.exists