From 994bb0f40c19d626fb964f87f1e2710f3c36ea75 Mon Sep 17 00:00:00 2001 From: Jimmy McCrory Date: Thu, 19 May 2016 14:46:08 -0700 Subject: [PATCH] Fix keystone tests Update test-prepare-containers.yml to use the default, inventory defined, remote connections for hosts so that tasks intended for containers run as expected. I0351dddc49da5908f46e09e22467f6fb112593dd recently merged in keystone causing the service to exit when fernet keys do not exist and this role's functional testing to fail. The 'Distribute the fernet key repository' task uses the 'ansible_ssh_host' variable from members of the 'keystone_all[1:]' group. Since 'ansible_ssh_host' is set through group_vars based on the current working host's 'ansible_host', it's not looked up correctly within loops and fernet keys are only being synced within the same host. Move 'ansible_ssh_host' from being dynamically assigned in group_vars to being statically assigned within the inventory. Change-Id: I177fadb728206285996f7ffb9d522db8ec63114b --- tests/group_vars/all_containers.yml | 1 - tests/inventory | 6 +++--- tests/test-prepare-containers.yml | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/group_vars/all_containers.yml b/tests/group_vars/all_containers.yml index 4cc97942..83ce0212 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. -ansible_ssh_host: "{{ ansible_host }}" container_name: "{{ inventory_hostname }}" container_networks: management_address: diff --git a/tests/inventory b/tests/inventory index 656b0f9c..5d4c5ff5 100644 --- a/tests/inventory +++ b/tests/inventory @@ -1,8 +1,8 @@ [all] localhost ansible_connection=local ansible_become=True -infra1 ansible_host=10.100.100.2 ansible_become=True ansible_user=root -keystone1 ansible_host=10.100.100.3 ansible_become=True ansible_user=root -keystone2 ansible_host=10.100.100.4 ansible_become=True ansible_user=root +infra1 ansible_ssh_host=10.100.100.2 ansible_host=10.100.100.2 ansible_become=True ansible_user=root +keystone1 ansible_ssh_host=10.100.100.3 ansible_host=10.100.100.3 ansible_become=True ansible_user=root +keystone2 ansible_ssh_host=10.100.100.4 ansible_host=10.100.100.4 ansible_become=True ansible_user=root [all_containers] infra1 diff --git a/tests/test-prepare-containers.yml b/tests/test-prepare-containers.yml index cf46e8ab..c0d539ea 100644 --- a/tests/test-prepare-containers.yml +++ b/tests/test-prepare-containers.yml @@ -15,7 +15,6 @@ - name: Playbook for creating containers hosts: all_containers - connection: local gather_facts: false roles: - role: "lxc_container_create"