Fix role gate tests for Ansible 2.3
Add 'become' and root 'user' options to the playbook instead of using 'ansible_become' through an inventory variable. Change-Id: Ic89c3786b51d6b3416e4d3903fde4d46dbe7ade2
This commit is contained in:
parent
4dd83ccf6d
commit
7e6fb6845c
@ -17,9 +17,9 @@ container_name: "{{ inventory_hostname }}"
|
||||
container_networks:
|
||||
management_address:
|
||||
address: "{{ ansible_host }}"
|
||||
bridge: "lxcbr0"
|
||||
bridge: "br-mgmt"
|
||||
interface: "eth1"
|
||||
netmask: "255.255.252.0"
|
||||
netmask: "255.255.255.0"
|
||||
type: "veth"
|
||||
physical_host: localhost
|
||||
properties:
|
||||
|
18
tests/host_vars/container1.yml
Normal file
18
tests/host_vars/container1.yml
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
# Copyright 2017, 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
|
18
tests/host_vars/container2.yml
Normal file
18
tests/host_vars/container2.yml
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
# Copyright 2017, 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
|
18
tests/host_vars/container3.yml
Normal file
18
tests/host_vars/container3.yml
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
# Copyright 2017, 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
|
@ -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
|
||||
|
||||
[rabbitmq_all_other]
|
||||
container1
|
||||
|
@ -26,9 +26,9 @@
|
||||
delegate_to: "{{ item }}"
|
||||
when: ansible_host == item
|
||||
with_items:
|
||||
- 10.100.100.101
|
||||
- 10.100.100.102
|
||||
- 10.100.100.103
|
||||
- 10.1.0.2
|
||||
- 10.1.0.3
|
||||
- 10.1.0.4
|
||||
- name: Open rabbitmq.config
|
||||
slurp:
|
||||
src: "/etc/rabbitmq/rabbitmq.config"
|
||||
|
Loading…
Reference in New Issue
Block a user