From 01840f29d2d04265d1d97f514ce257060d271d50 Mon Sep 17 00:00:00 2001 From: Jimmy McCrory Date: Tue, 25 Apr 2017 15:53:02 -0700 Subject: [PATCH] Standardize test vars Move test host vars from the inventory to individual files for each host. 'ansible_become' has been removed from localhost's vars since it should be handled on a playbook basis. The containers' management addresses have also been moved to the br-mgmt bridge. Change-Id: Ib1c08d7df0d1be855ca9579faa3a2ad85b164e0d --- tests/group_vars/all_containers.yml | 2 +- tests/host_vars/container1.yml | 4 ++++ tests/host_vars/container2.yml | 4 ++++ tests/host_vars/container3.yml | 4 ++++ tests/inventory | 8 ++++---- 5 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 tests/host_vars/container1.yml create mode 100644 tests/host_vars/container2.yml create mode 100644 tests/host_vars/container3.yml diff --git a/tests/group_vars/all_containers.yml b/tests/group_vars/all_containers.yml index 83ce021..9710edf 100644 --- a/tests/group_vars/all_containers.yml +++ b/tests/group_vars/all_containers.yml @@ -17,7 +17,7 @@ container_name: "{{ inventory_hostname }}" container_networks: management_address: address: "{{ ansible_host }}" - bridge: "lxcbr0" + bridge: "br-mgmt" interface: "eth1" netmask: "255.255.252.0" type: "veth" diff --git a/tests/host_vars/container1.yml b/tests/host_vars/container1.yml new file mode 100644 index 0000000..d84931d --- /dev/null +++ b/tests/host_vars/container1.yml @@ -0,0 +1,4 @@ +--- +ansible_host: 10.100.100.2 +ansible_become: True +ansible_user: root diff --git a/tests/host_vars/container2.yml b/tests/host_vars/container2.yml new file mode 100644 index 0000000..f3a4aee --- /dev/null +++ b/tests/host_vars/container2.yml @@ -0,0 +1,4 @@ +--- +ansible_host: 10.100.100.3 +ansible_become: True +ansible_user: root diff --git a/tests/host_vars/container3.yml b/tests/host_vars/container3.yml new file mode 100644 index 0000000..413cd96 --- /dev/null +++ b/tests/host_vars/container3.yml @@ -0,0 +1,4 @@ +--- +ansible_host: 10.100.100.4 +ansible_become: True +ansible_user: root diff --git a/tests/inventory b/tests/inventory index 5e7e8ac..531b6a2 100644 --- a/tests/inventory +++ b/tests/inventory @@ -1,8 +1,8 @@ [all] -localhost ansible_become=True -container1 ansible_host=10.100.100.101 ansible_become=True ansible_user=root -container2 ansible_host=10.100.100.102 ansible_become=True ansible_user=root -container3 ansible_host=10.100.100.103 ansible_become=True ansible_user=root +localhost +container1 +container2 +container3 [repo_all] container1