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
This commit is contained in:
Jimmy McCrory 2016-05-19 14:46:08 -07:00
parent 4cf8194f83
commit 994bb0f40c
3 changed files with 3 additions and 5 deletions

View File

@ -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:

View File

@ -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

View File

@ -15,7 +15,6 @@
- name: Playbook for creating containers
hosts: all_containers
connection: local
gather_facts: false
roles:
- role: "lxc_container_create"