Only use eth1 interface on the controller if it exists

For testing we can use a bridge without any ports.
This commit is contained in:
Mark Goddard 2018-03-13 12:43:16 +00:00
parent 54c2f06d7a
commit ce3b303321
1 changed files with 2 additions and 2 deletions

View File

@ -4,8 +4,8 @@
# Controller interface on all-in-one network.
aio_interface: breth1
aio_bridge_ports:
- eth1
# Use eth1 if it exists, otherwise the bridge will have no ports.
aio_bridge_ports: "{{ ['eth1'] if 'ansible_eth1' in hostvars[inventory_hostname] else [] }}"
###############################################################################
# Dummy variable to allow Ansible to accept this file.