From 098cab2ae8be7bf3ff07c8e3c5e2bb9b7f0e8ba0 Mon Sep 17 00:00:00 2001 From: Travis Truman Date: Tue, 13 Sep 2016 11:20:43 -0400 Subject: [PATCH] Convert role testing to use Ansible 2.1.1 Change-Id: Ia923ae1a3be0e4aea821c70f7bb0744c900aaa77 --- .gitignore | 3 +++ templates/openstack-host-hostfile-setup.sh.j2 | 2 +- tests/inventory | 6 +++--- tox.ini | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 37fed46e..bb71da8e 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ doc/build/ *.log *.sql *.sqlite +logs/ # OS generated files # ###################### @@ -63,4 +64,6 @@ releasenotes/build .vagrant # Test playbooks brought in by tox +tests/plugins tests/playbooks +tests/test.retry diff --git a/templates/openstack-host-hostfile-setup.sh.j2 b/templates/openstack-host-hostfile-setup.sh.j2 index 96f4590a..a9e5e168 100644 --- a/templates/openstack-host-hostfile-setup.sh.j2 +++ b/templates/openstack-host-hostfile-setup.sh.j2 @@ -46,7 +46,7 @@ host_update "{{ ansible_hostname|default(host_rfc_1034_1035_name) }}" \ host_update "{{ hostvars[item]['ansible_hostname']|default(target_rfc_1034_1035_name) }}" \ "{{ target_rfc_1034_1035_name }}" \ "{{ item }}" \ - "{{ hostvars[item]['ansible_ssh_host'] }}" \ + "{{ hostvars[item]['ansible_host'] | default("127.0.0.1") }}" \ "{{ openstack_domain }}" {% endfor %} diff --git a/tests/inventory b/tests/inventory index f1d67865..e854d4e8 100644 --- a/tests/inventory +++ b/tests/inventory @@ -1,7 +1,7 @@ [all] -localhost ansible_ssh_host=127.0.0.1 ansible_connection=local ansible_become=True -test1 ansible_ssh_host=127.111.111.101 ansible_become=True -test2 ansible_ssh_host=127.111.111.102 ansible_become=True +localhost ansible_host=127.0.0.1 ansible_become=True +test1 ansible_host=127.111.111.101 ansible_become=True +test2 ansible_host=127.111.111.102 ansible_become=True [all_containers] test1 diff --git a/tox.ini b/tox.ini index 3caa93d0..975bbed3 100644 --- a/tox.ini +++ b/tox.ini @@ -94,7 +94,7 @@ commands = [testenv:ansible] deps = {[testenv]deps} - ansible==1.9.4 + ansible==2.1.1 ansible-lint>=2.7.0,<3.0.0 setenv = {[testenv]setenv}