From ab495546af8ba0fe9ea1234e4f25a7e62ed92191 Mon Sep 17 00:00:00 2001 From: CNlukai Date: Sat, 30 Jan 2016 11:34:27 +0800 Subject: Update the method to get external nic mac address JIRA: COMPASS-295 Change-Id: Ifc72424d2627f444ec52d2875a5252f9fd898c8a Signed-off-by: CNlukai Signed-off-by: Justin-chi --- deploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'deploy/adapters/ansible/roles/onos_cluster') diff --git a/deploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml b/deploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml index 9761af71..47f0f6e8 100755 --- a/deploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml +++ b/deploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml @@ -48,7 +48,7 @@ - name: set veth to ovs shell: > - export externamMac=`ifconfig eth1 | grep "HWaddr" | awk '{print $5}'`; + export externamMac=`ifconfig eth1 | grep -Eo '\<[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'`; ifconfig onos_port2 hw ether $externamMac; ovs-vsctl add-port br-prv onos_port1; ignore_errors: True -- cgit 1.2.3-korg