Skip to content

Commit

Permalink
If the config file is based on a specific unicast_src_ip we should ex…
Browse files Browse the repository at this point in the history
…plicitly add it
  • Loading branch information
frank-f committed Dec 7, 2023
1 parent c650ac2 commit 1454212
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
12 changes: 6 additions & 6 deletions manifests/vrrp/instance.pp
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,6 @@
$auth_pass
}

concat::fragment { "keepalived.conf_vrrp_instance_${_name}":
target => "${keepalived::config_dir}/keepalived.conf",
content => template('keepalived/vrrp_instance.erb'),
order => "100-${_name}-000",
}

if size($unicast_peer_array) > 0 or $collect_unicast_peers {
concat::fragment { "keepalived.conf_vrrp_instance_${_name}_upeers_header":
target => "${keepalived::config_dir}/keepalived.conf",
Expand Down Expand Up @@ -292,6 +286,12 @@
}
}

concat::fragment { "keepalived.conf_vrrp_instance_${_name}":
target => "${keepalived::config_dir}/keepalived.conf",
content => template('keepalived/vrrp_instance.erb'),
order => "100-${_name}-000",
}

concat::fragment { "keepalived.conf_vrrp_instance_${_name}_footer":
target => "${keepalived::config_dir}/keepalived.conf",
content => "}\n\n",
Expand Down
3 changes: 3 additions & 0 deletions templates/vrrp_instance.erb
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,7 @@ vrrp_instance <%= @_name %> {
<%- if @unicast_source_ip -%>

unicast_src_ip <%= @unicast_source_ip %>
<%- elsif @unicast_src -%>

unicast_src_ip <%= @unicast_src %>
<%- end -%>

0 comments on commit 1454212

Please sign in to comment.