blob: a01a74c628e7546749ddac01f27ddeb139c4c570 [file] [log] [blame]
Dennis Dmitrievf4826bc2017-09-28 19:03:54 +03001{#- Provides: #}
Dennis Dmitrievf4826bc2017-09-28 19:03:54 +03002{#- vhost0 , as a keepalived vip interface #}
3{#- Requirements: #}
4{#- _param:tenant_vlan #}
5{#- _param:tenant_address #}
Dennis Dmitrievcf5f43b2017-10-11 15:10:27 +03006{#- _param:tenant_network_netmask #}
Dennis Dmitrievf4826bc2017-09-28 19:03:54 +03007{#- _param:tenant_network_gateway #}
Dennis Dmitrievf4826bc2017-09-28 19:03:54 +03008 # {{ interfaces_role }}
9 {%- for interface_name, interface in interfaces.items() %}
10 {{ interface_name }}:
11 mtu: 9000
12 enabled: true
abaraniukd2ccfae2018-11-08 13:52:32 +020013 master: bond0
Dennis Dmitrievf4826bc2017-09-28 19:03:54 +030014 name: {{ interface_name }}
15 proto: manual
abaraniukd2ccfae2018-11-08 13:52:32 +020016 type: slave
Dennis Dmitrievf4826bc2017-09-28 19:03:54 +030017 ipflush_onchange: true
18 {%- endfor %}
19 bond0:
20 mtu: 9000
21 enabled: true
22 mode: active-backup
23 proto: manual
24 slaves: {{ ' '.join(interfaces.keys()) }}
25 type: bond
26 use_interfaces:
27 {%- for interface_name in interfaces.keys() %}
28 - {{ interface_name }}
29 {%- endfor %}
30 require_interfaces:
31 {%- for interface_name in interfaces.keys() %}
32 - {{ interface_name }}
33 {%- endfor %}
34
35 {{- set_param('keepalived_vip_interface', 'vhost0') }}
36 vhost0:
37 mtu: 9000
38 address: ${_param:_esc}{_param:tenant_address}
39 netmask: ${_param:_esc}{_param:tenant_network_netmask}
Dennis Dmitrievf4826bc2017-09-28 19:03:54 +030040 enabled: true
41 proto: static
42 type: eth
43 pre_up_cmds:
44 - /usr/lib/contrail/if-vhost0
45 name_servers:
46 - ${_param:_esc}{_param:dns_server01}
47 - ${_param:_esc}{_param:dns_server02}
48 use_interfaces:
49 - bond0.${_param:_esc}{_param:tenant_vlan}
50 require_interfaces:
51 - bond0.${_param:_esc}{_param:tenant_vlan}
52 bond0.tenant_vlan:
53 mtu: 9000
54 name: bond0.${_param:_esc}{_param:tenant_vlan}
55 enabled: true
56 proto: manual
57 type: vlan
58 use_interfaces:
59 - bond0
60 require_interfaces:
sgudz3dcf8f72017-10-18 17:31:01 +030061 - bond0