Initial commit
[ta/infra-ansible.git] / roles / bootstrap-host / templates / osa_interfaces_multinode.cfg.j2
1 {% if bootstrap_host_encapsulation_enabled | bool %}
2 {% for nic_name, nic_details in bootstrap_host_encapsulation_interfaces.iteritems() %}
3 # {{ nic_details.friendly_name }}
4 auto {{ nic_name }}
5 iface {{ nic_name }} inet manual
6     pre-up ip link add {{ nic_name }} type vxlan id {{ nic_details.id }} group 239.0.0.{{ nic_details.id }} dev {{ nic_details.underlay_device }} || true
7     up ip link set $IFACE up
8     down ip link set $IFACE down
9     post-down ip link del {{ nic_name }} || true
10
11 {% endfor %}
12 {% endif %}
13 {%- for nic_name, nic_details in bootstrap_host_bridges_interfaces.iteritems() -%}
14 auto {{ nic_name }}
15 iface {{ nic_name }} inet {{ nic_details.mode | default('static') }}
16     bridge_stp off
17     bridge_waitport 0
18     bridge_fd 0
19     bridge_ports {{ nic_details.ports }}
20     offload-sg {{ nic_details.offload_sg | default('off') }}
21     {% if nic_details.mode | default('static') == 'static' -%}
22     address {{ nic_details.ip_address_range }}.{{ node_id }}
23     netmask {{ nic_details.ip_netmask }}
24     {% endif %}
25     {%- if nic_details.state_change_scripts is defined %}{{ nic_details.state_change_scripts }}
26     {% endif %}
27
28 {% endfor %}