From d279eb748b6dbe61068b3b376e3dac1248e5071d Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Tue, 24 Mar 2015 15:03:37 +0000 Subject: neutron yml conditionals around getting eth info --- openstack/usr/share/openstack/neutron.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/openstack/usr/share/openstack/neutron.yml b/openstack/usr/share/openstack/neutron.yml index 03dad91f..0e0b3e8f 100644 --- a/openstack/usr/share/openstack/neutron.yml +++ b/openstack/usr/share/openstack/neutron.yml @@ -76,9 +76,15 @@ # https://fosskb.wordpress.com/2014/10/18/openstack-juno-on-ubuntu-14-10/ # and https://fosskb.wordpress.com/2014/06/10/managing-openstack-internaldataexternal-network-in-one-interface/ - - set_fact: ETH_IP_ADDRESS={{ ansible_default_ipv4.address }} - - set_fact: ETH_MAC_ADDRESS={{ ansible_default_ipv4.macaddress }} - set_fact: ETH_INTERFACE={{ ansible_default_ipv4.interface }} + when: ansible_default_ipv4.interface + - set_fact: ETH_INTERFACE="br-eth0" + when: not ansible_default_ipv4.interface + + - set_fact: ETH_MAC_ADDRESS={{ ansible_default_ipv4.macaddress }} + when: ETH_INTERFACE != "br-eth0" + - set_fact: ETH_IP_ADDRESS={{ ansible_default_ipv4.address }} + when: ETH_INTERFACE != "br-eth0" # if is not br-eth0 - name: Disable dhcp on the bound physical interface -- cgit v1.2.1