From 26fdbcd102954d22eba630740cec4139c310f20d 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: I405b64b8067e43309257d50a5c2acc915c789d24 --- tests/group_vars/all_containers.yml | 1 - tests/host_vars/infra1.yml | 1 + tests/host_vars/ironic1.yml | 2 +- tests/host_vars/openstack1.yml | 2 +- tests/host_vars/swift-storage1.yml | 1 + 5 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/group_vars/all_containers.yml b/tests/group_vars/all_containers.yml index f0d220d8..4065177c 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 }}" physical_host: localhost properties: service_name: "{{ inventory_hostname }}" diff --git a/tests/host_vars/infra1.yml b/tests/host_vars/infra1.yml index 05c9e791..d1503e44 100644 --- a/tests/host_vars/infra1.yml +++ b/tests/host_vars/infra1.yml @@ -16,6 +16,7 @@ ansible_host: 10.1.1.101 ansible_become: True ansible_user: root +container_name: infra1 container_networks: management_address: address: "{{ ansible_host }}" diff --git a/tests/host_vars/ironic1.yml b/tests/host_vars/ironic1.yml index 576b8db6..8c719d9b 100644 --- a/tests/host_vars/ironic1.yml +++ b/tests/host_vars/ironic1.yml @@ -17,7 +17,7 @@ ansible_host: 10.1.1.104 ansible_become: True ansible_user: root ipmi_address: 10.1.4.104 -container_name: "{{ inventory_hostname }}" +container_name: ironic1 container_networks: management_address: address: "{{ ansible_host }}" diff --git a/tests/host_vars/openstack1.yml b/tests/host_vars/openstack1.yml index 8e80b538..a3d182ae 100644 --- a/tests/host_vars/openstack1.yml +++ b/tests/host_vars/openstack1.yml @@ -19,7 +19,7 @@ ansible_user: root tunnel_address: 10.1.2.102 neutron_local_ip: 10.1.2.102 storage_address: 10.1.5.102 -container_name: "{{ inventory_hostname }}" +container_name: openstack1 container_networks: management_address: address: "{{ ansible_host }}" diff --git a/tests/host_vars/swift-storage1.yml b/tests/host_vars/swift-storage1.yml index 65a2cc9c..79a2bb3e 100644 --- a/tests/host_vars/swift-storage1.yml +++ b/tests/host_vars/swift-storage1.yml @@ -17,6 +17,7 @@ ansible_host: 10.1.1.103 storage_address: 10.1.5.103 ansible_user: root ansible_become: True +container_name: swift-storage1 container_networks: management_address: address: "{{ ansible_host }}"