From 95343d26c8d2cc9789b87a77748b3e7becd548ca Mon Sep 17 00:00:00 2001 From: "carey.xu" Date: Fri, 18 Sep 2015 14:55:04 +0800 Subject: separate the mgmt vip from public vip, remove HA_VIP Change-Id: Iaa877b7ce93ba9c12bc9be6f3bd101779f07ae9c JIRA: COMPASS-51 --- .../roles/setup-network/templates/my_configs.debian | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'deploy/adapters/ansible/roles/setup-network/templates/my_configs.debian') diff --git a/deploy/adapters/ansible/roles/setup-network/templates/my_configs.debian b/deploy/adapters/ansible/roles/setup-network/templates/my_configs.debian index 54031ed4..5ab1519b 100644 --- a/deploy/adapters/ansible/roles/setup-network/templates/my_configs.debian +++ b/deploy/adapters/ansible/roles/setup-network/templates/my_configs.debian @@ -1,16 +1,14 @@ -{%- for intf in host_ip_settings %} +{%- for alias, intf in host_ip_settings.items() %} -auto {{ intf["alias"] }} -iface {{ intf["alias"] }} inet static +auto {{ alias }} +iface {{ alias }} inet static address {{ intf["ip"] }} netmask {{ intf["netmask"] }} {% if "gw" in intf %} gateway {{ intf["gw"] }} {% endif %} -{% for sys_intf in network_cfg["sys_intf_mappings"] %} -{% if "vlan_tag" in sys_intf and sys_intf["name"] == intf["alias"] %} - pre-up ip link set {{ sys_intf["interface"] }} up - pre-up ip link add link {{ sys_intf["interface"] }} name {{ sys_intf["name"] }} type vlan id {{ sys_intf["vlan_tag"] }} +{% if intf["name"] == alias %} + pre-up ip link set {{ sys_intf_mappings[alias]["interface"] }} up + pre-up ip link add link {{ sys_intf_mappings[alias]["interface"] }} name {{ alias }} type vlan id {{ sys_intf_mappings[alias]["vlan_tag"] }} {% endif %} {% endfor %} -{% endfor %} -- cgit 1.2.3-korg