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:
Jesse Pretorius 2017-05-16 12:04:48 +01:00
parent 4dd83ccf6d
commit 7e6fb6845c
6 changed files with 63 additions and 9 deletions

View File

@ -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:

View 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

View 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

View 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

View File

@ -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

View File

@ -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"