From 72039e915d1fc960bd0d7fccd910ea282d61bee7 Mon Sep 17 00:00:00 2001 From: your name Date: Wed, 9 Sep 2015 03:26:11 -0400 Subject: Compass Netconfig optimization Change-Id: Icbcfc7d794623436f22be5f6763b212a25d4fac7 JIRA: COMPASS-30 --- .../roles/setup-network/templates/my_configs.debian | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 deploy/adapters/ansible/roles/setup-network/templates/my_configs.debian (limited to 'deploy/adapters/ansible/roles/setup-network/templates') diff --git a/deploy/adapters/ansible/roles/setup-network/templates/my_configs.debian b/deploy/adapters/ansible/roles/setup-network/templates/my_configs.debian new file mode 100644 index 00000000..54031ed4 --- /dev/null +++ b/deploy/adapters/ansible/roles/setup-network/templates/my_configs.debian @@ -0,0 +1,16 @@ +{%- for intf in host_ip_settings %} + +auto {{ intf["alias"] }} +iface {{ intf["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"] }} +{% endif %} +{% endfor %} +{% endfor %} -- cgit 1.2.3-korg