From 24cb41d08f524061705073dc6fb51607dfd0e78b Mon Sep 17 00:00:00 2001 From: Jimmy McCrory Date: Sat, 20 Oct 2018 15:28:29 -0700 Subject: [PATCH] Set container_name as host_var in test inventory The connection plugin no longer falls back on using the inventory_hostname as the container_name. Set container_name as a host var for each container in the test inventory. Change-Id: I1bf946bd8a9341c9d5030affac5779cbcbe94be6 --- tests/group_vars/all_containers.yml | 1 - tests/host_vars/agents1.yml | 1 + tests/host_vars/agents2.yml | 1 + tests/host_vars/infra1.yml | 1 + tests/host_vars/server1.yml | 1 + tests/host_vars/server2.yml | 1 + 6 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/group_vars/all_containers.yml b/tests/group_vars/all_containers.yml index 708ad55e..dc7ac2e7 100644 --- a/tests/group_vars/all_containers.yml +++ b/tests/group_vars/all_containers.yml @@ -13,7 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -container_name: "{{ inventory_hostname }}" container_networks: management_address: address: "{{ ansible_host }}" diff --git a/tests/host_vars/agents1.yml b/tests/host_vars/agents1.yml index 9878fcc2..9f7fd63f 100644 --- a/tests/host_vars/agents1.yml +++ b/tests/host_vars/agents1.yml @@ -16,3 +16,4 @@ ansible_host: 10.1.0.5 ansible_become: True ansible_user: root +container_name: agents1 diff --git a/tests/host_vars/agents2.yml b/tests/host_vars/agents2.yml index b78a2ea8..e38ddfed 100644 --- a/tests/host_vars/agents2.yml +++ b/tests/host_vars/agents2.yml @@ -16,3 +16,4 @@ ansible_host: 10.1.0.6 ansible_become: True ansible_user: root +container_name: agents2 diff --git a/tests/host_vars/infra1.yml b/tests/host_vars/infra1.yml index 86d45ff8..fcf92ebc 100644 --- a/tests/host_vars/infra1.yml +++ b/tests/host_vars/infra1.yml @@ -16,3 +16,4 @@ ansible_host: 10.1.0.2 ansible_become: True ansible_user: root +container_name: infra1 diff --git a/tests/host_vars/server1.yml b/tests/host_vars/server1.yml index 23b94986..618c2361 100644 --- a/tests/host_vars/server1.yml +++ b/tests/host_vars/server1.yml @@ -16,3 +16,4 @@ ansible_host: 10.1.0.3 ansible_become: True ansible_user: root +container_name: server1 diff --git a/tests/host_vars/server2.yml b/tests/host_vars/server2.yml index 0e876f60..75b74bd1 100644 --- a/tests/host_vars/server2.yml +++ b/tests/host_vars/server2.yml @@ -16,3 +16,4 @@ ansible_host: 10.1.0.4 ansible_become: True ansible_user: root +container_name: server2