{# # Copyright 2015 Hewlett Packard Enterprise Development Company LP # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. #} vrrp_script check_script { script {{ check_script_path }} interval {{ vrrp_check_interval }} fall {{ vrrp_fail_count }} rise {{ vrrp_success_count }} } vrrp_instance {{ vrrp_group_name }} { state {{ amp_role }} interface {{ amp_intf }} virtual_router_id {{ amp_vrrp_id }} priority {{ amp_priority }} nopreempt accept garp_master_refresh {{ vrrp_garp_refresh }} garp_master_refresh_repeat {{ vrrp_garp_refresh_repeat }} advert_int {{ advert_int }} authentication { auth_type {{ vrrp_auth_type }} auth_pass {{ vrrp_auth_pass }} } unicast_src_ip {{ amp_vrrp_ip }} unicast_peer { {% for amp_vrrp_ip in peers_vrrp_ips %} {{ amp_vrrp_ip }} {% endfor %} } virtual_ipaddress { {{ vip_ip_address }} } virtual_routes { {{ vip_network_cidr }} dev {{ amp_intf }} src {{ vip_ip_address }} scope link table 1 } virtual_rules { from {{ vip_ip_address }}/{{ '128' if vip_ipv6 else '32' }} table 1 priority 100 } track_script { check_script } }