From a7a8ebaab5e98138634ec267da138e4e9e81b93d Mon Sep 17 00:00:00 2001 From: Jimmy McCrory Date: Wed, 19 Apr 2017 17:06:03 -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: If05e771eae4b62402aa94eaa5979e44e3597957f --- tests/group_vars/all_containers.yml | 2 +- tests/host_vars/barbican1.yml | 18 ++++++++++++++++++ tests/host_vars/infra1.yml | 18 ++++++++++++++++++ tests/host_vars/keystone1.yml | 18 ++++++++++++++++++ tests/host_vars/localhost.yml | 2 +- tests/inventory | 8 ++++---- 6 files changed, 60 insertions(+), 6 deletions(-) create mode 100644 tests/host_vars/barbican1.yml create mode 100644 tests/host_vars/infra1.yml create mode 100644 tests/host_vars/keystone1.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/barbican1.yml b/tests/host_vars/barbican1.yml new file mode 100644 index 0000000..0e876f6 --- /dev/null +++ b/tests/host_vars/barbican1.yml @@ -0,0 +1,18 @@ +--- +# Copyright 2016, Rackspace US, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +ansible_host: 10.1.0.4 +ansible_become: True +ansible_user: root diff --git a/tests/host_vars/infra1.yml b/tests/host_vars/infra1.yml new file mode 100644 index 0000000..86d45ff --- /dev/null +++ b/tests/host_vars/infra1.yml @@ -0,0 +1,18 @@ +--- +# Copyright 2016, Rackspace US, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +ansible_host: 10.1.0.2 +ansible_become: True +ansible_user: root diff --git a/tests/host_vars/keystone1.yml b/tests/host_vars/keystone1.yml new file mode 100644 index 0000000..23b9498 --- /dev/null +++ b/tests/host_vars/keystone1.yml @@ -0,0 +1,18 @@ +--- +# Copyright 2016, Rackspace US, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +ansible_host: 10.1.0.3 +ansible_become: True +ansible_user: root diff --git a/tests/host_vars/localhost.yml b/tests/host_vars/localhost.yml index 14bf3b0..65ddeaa 100644 --- a/tests/host_vars/localhost.yml +++ b/tests/host_vars/localhost.yml @@ -16,4 +16,4 @@ bridges: - "br-mgmt" -ansible_python_interpreter: "/usr/bin/python2" \ No newline at end of file +ansible_python_interpreter: "/usr/bin/python2" diff --git a/tests/inventory b/tests/inventory index 87b18b8..af4326f 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 -barbican1 ansible_host=10.100.100.4 ansible_become=True ansible_user=root +localhost +infra1 +keystone1 +barbican1 [all_containers] infra1