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: I521ca58d07a27278864b01e02c00db43b31a0916
This commit is contained in:
parent
22c4d0911a
commit
dc034ff5c3
|
@ -18,7 +18,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"
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
---
|
||||
ansible_host: 10.100.100.2
|
||||
ansible_become: True
|
||||
ansible_user: root
|
||||
lxc_container_config_list:
|
||||
- "lxc.aa_profile=lxc-openstack"
|
||||
- "lxc.mount.entry=/openstack/{{ inventory_hostname }} opt/test1 none bind 0 0"
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
---
|
||||
ansible_host: 10.100.100.3
|
||||
ansible_become: True
|
||||
ansible_user: root
|
||||
lxc_container_config_list:
|
||||
- "lxc.aa_profile=unconfined"
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
ansible_host: 10.100.100.4
|
||||
ansible_become: True
|
||||
ansible_user: root
|
|
@ -1,8 +1,8 @@
|
|||
[all]
|
||||
localhost ansible_become=True
|
||||
container1 ansible_host=10.100.100.2 ansible_become=True ansible_user=root
|
||||
container2 ansible_host=10.100.100.3 ansible_become=True ansible_user=root
|
||||
container3 ansible_host=10.100.100.4 ansible_become=True ansible_user=root
|
||||
localhost
|
||||
container1
|
||||
container2
|
||||
container3
|
||||
|
||||
[all_containers]
|
||||
container1
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
|
||||
- name: Test whether the role produced expected results
|
||||
hosts: localhost
|
||||
user: root
|
||||
become: true
|
||||
tasks:
|
||||
- name: List the running LXC containers present on the host
|
||||
command: lxc-ls -1 --fancy --fancy-format name,ipv4 --running
|
||||
|
|
Loading…
Reference in New Issue