Make role functional testing more idempotent
Do not attempt to create the bridges when they are already present. This allows the functional tests to be run multiple times against the same host without failing. Change-Id: I198bb167dd3dfba12d897c56e2affcae5ace1cc0
This commit is contained in:
parent
3a428e706a
commit
9a1486b797
@ -40,17 +40,26 @@
|
||||
- { src: '/etc/pip.conf', dest: '/etc/pip.conf' }
|
||||
when: nodepool.stat.exists | bool
|
||||
post_tasks:
|
||||
# The elegant solution: change the bridge everywhere to replicate the standard behaviour
|
||||
# The elegant solution: change the bridge everywhere to replicate the standard behaviour
|
||||
- name: Register list of bridges
|
||||
command: /sbin/brctl show
|
||||
register: bridge_list
|
||||
- name: Create br-mgmt bridge
|
||||
command: /sbin/brctl addbr br-mgmt
|
||||
when:
|
||||
- not bridge_list.stdout | search("br-mgmt")
|
||||
- name: IP br-mgmt
|
||||
command: /sbin/ifconfig br-mgmt 10.100.102.1 netmask 255.255.255.0
|
||||
- name: Create br-vxlan bridge
|
||||
command: /sbin/brctl addbr br-vxlan
|
||||
when:
|
||||
- not bridge_list.stdout | search("br-vxlan")
|
||||
- name: IP br-vxlan
|
||||
command: /sbin/ifconfig br-vxlan 10.100.101.1 netmask 255.255.255.0
|
||||
- name: Create br-vlan bridge
|
||||
command: /sbin/brctl addbr br-vlan
|
||||
when:
|
||||
- not bridge_list.stdout | search("br-vlan")
|
||||
- name: IP br-vlan
|
||||
command: /sbin/ifconfig br-vlan 10.1.13.1 netmask 255.255.255.0
|
||||
- name: Add iptables rule to ensure ssh checksum is correct
|
||||
|
Loading…
x
Reference in New Issue
Block a user