Skip to content

Commit

Permalink
vrrp::instance: {vrrp_,}track_file: Switch default undef->[]
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Mar 12, 2024
1 parent 103b8a8 commit 4be59bb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1211,19 +1211,19 @@ Default value: `undef`

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

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

Define which file trackers to run. References a track_file block that can be created with keepalived::vrrp::track_file.

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

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

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

Define which file trackers to run. Deprecated, for keepalived < 2.1.0. References a vrrp_track_file block that can be created with keepalived::vrrp::vrrp_track_file.

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

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

Expand Down
4 changes: 2 additions & 2 deletions manifests/vrrp/instance.pp
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@
Optional[Variant[String, Sensitive[String]]] $auth_pass = undef,
$track_script = undef,
Optional[Array[String[1]]] $track_process = undef,
Optional[Array[String[1]]] $track_file = undef,
Optional[Array[String[1]]] $vrrp_track_file = undef,
Array[String[1]] $track_file = [],
Array[String[1]] $vrrp_track_file = [],
$track_interface = undef,
$lvs_interface = undef,
$virtual_ipaddress_int = undef,
Expand Down
8 changes: 4 additions & 4 deletions templates/vrrp_instance.erb
Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,18 @@ vrrp_instance <%= @_name %> {
<%- end -%>
}
<%- end -%>
<%- if @track_file -%>
<%- unless @track_file.empty? -%>

track_file {
<%- Array(@track_file).each do |track| -%>
<%- @track_file.each do |track| -%>
<%= track %>
<%- end -%>
}
<%- end -%>
<%- if @vrrp_track_file -%>
<%- unless @vrrp_track_file.empty? -%>

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

0 comments on commit 4be59bb

Please sign in to comment.