From 66e6b8f69a6e4c5c0c3e992270eaf5b82cf356a0 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Mon, 22 Oct 2018 13:00:33 +0100 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: I7a9343d29f853eba9b377855149d07a3d2865143 --- tests/group_vars/all_containers.yml | 2 +- tests/inventory | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/group_vars/all_containers.yml b/tests/group_vars/all_containers.yml index 29a92ebb..802a50f4 100644 --- a/tests/group_vars/all_containers.yml +++ b/tests/group_vars/all_containers.yml @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 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/inventory b/tests/inventory index cde0e288..28af82de 100644 --- a/tests/inventory +++ b/tests/inventory @@ -1,7 +1,7 @@ [all] localhost -infra1 ansible_host=10.1.0.2 ansible_become=True ansible_user=root -keystone1 ansible_host=10.1.0.3 ansible_become=True ansible_user=root +infra1 ansible_host=10.1.0.2 ansible_become=True ansible_user=root container_name=infra1 +keystone1 ansible_host=10.1.0.3 ansible_become=True ansible_user=root container_name=keystone1 [all_containers] infra1