summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/setup-network/templates
diff options
context:
space:
mode:
authorcarey.xu <carey.xuhan@huawei.com>2015-09-18 14:55:04 +0800
committercarey.xu <carey.xuhan@huawei.com>2015-09-18 15:23:38 +0800
commit95343d26c8d2cc9789b87a77748b3e7becd548ca (patch)
treef2850e996dd61b46829623d088c329f94b6a9c88 /deploy/adapters/ansible/roles/setup-network/templates
parent28420aea06c161605ba07449daa38436d0911e20 (diff)
separate the mgmt vip from public vip, remove HA_VIP
Change-Id: Iaa877b7ce93ba9c12bc9be6f3bd101779f07ae9c JIRA: COMPASS-51
Diffstat (limited to 'deploy/adapters/ansible/roles/setup-network/templates')
-rw-r--r--deploy/adapters/ansible/roles/setup-network/templates/my_configs.debian14
1 files changed, 6 insertions, 8 deletions
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 %}