diff --git a/tests/inventory b/tests/inventory index 56ca0b3f..875a0114 100644 --- a/tests/inventory +++ b/tests/inventory @@ -1,5 +1,5 @@ [all] -localhost ansible_host=127.0.0.1 ansible_become=True +localhost test1 ansible_host=127.111.111.101 ansible_become=True test2 ansible_host=127.111.111.102 ansible_become=True test3 ansible_host=127.111.111.103 ansible_become=True diff --git a/tests/test.yml b/tests/test.yml index 24c9caa5..70e60b75 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -13,11 +13,13 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Add some data to use for verification later - name: Playbook for test setup hosts: localhost connection: local + become: true gather_facts: false - tasks: + pre_tasks: - name: Add entries to hosts file blockinfile: dest: /etc/hosts @@ -27,11 +29,15 @@ 127.111.111.103 test3.additional marker: "" -- include: "common/test-install-openstack-hosts.yml" +# Prepare the user ssh keys +- include: common/test-prepare-keys.yml + +# Execute the role +- include: common/test-install-openstack-hosts.yml - name: Playbook for role testing hosts: localhost - connection: local + become: true gather_facts: true tasks: - name: Open modules file