Skip to content

Commit

Permalink
Merge pull request #320 from bastelfreak/inter
Browse files Browse the repository at this point in the history
vrrp::instance: track_interface: Enforce Array datatype
  • Loading branch information
bastelfreak authored Apr 2, 2024
2 parents ac3cc53 + ade669a commit 70567eb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,7 @@ Default value: `[]`

##### <a name="-keepalived--vrrp--instance--track_interface"></a>`track_interface`

Data type: `Any`
Data type: `Array[String[1]]`

Define which interface(s) to monitor.
Go to FAULT state if one of
Expand All @@ -1238,7 +1238,7 @@ May be specified as either:
a) interface name
b) array of interfaces names

Default value: `undef`
Default value: `[]`

##### <a name="-keepalived--vrrp--instance--lvs_interface"></a>`lvs_interface`

Expand Down
2 changes: 1 addition & 1 deletion manifests/vrrp/instance.pp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
Array[String[1]] $track_process = [],
Array[String[1]] $track_file = [],
Array[String[1]] $vrrp_track_file = [],
$track_interface = undef,
Array[String[1]] $track_interface = [],
$lvs_interface = undef,
$virtual_ipaddress_int = undef,
$virtual_ipaddress_excluded = undef,
Expand Down
4 changes: 2 additions & 2 deletions templates/vrrp_instance.erb
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ vrrp_instance <%= @_name %> {
<%- end -%>
}
<%- end -%>
<%- if @track_interface -%>
<%- unless @track_interface.empty? -%>

track_interface {
<%- Array(@track_interface).each do |interface| -%>
<%- @track_interface.each do |interface| -%>
<%= interface %>
<%- end -%>
}
Expand Down

0 comments on commit 70567eb

Please sign in to comment.