Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vrrp::instance: track_process: Switch default undef->[] #316

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1203,27 +1203,27 @@ Default value: `undef`

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

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

Define which process trackers to run.

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

##### <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
6 changes: 3 additions & 3 deletions manifests/vrrp/instance.pp
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@
$auth_type = undef,
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_process = [],
Array[String[1]] $track_file = [],
Array[String[1]] $vrrp_track_file = [],
$track_interface = undef,
$lvs_interface = undef,
$virtual_ipaddress_int = undef,
Expand Down
12 changes: 6 additions & 6 deletions templates/vrrp_instance.erb
Original file line number Diff line number Diff line change
Expand Up @@ -105,26 +105,26 @@ vrrp_instance <%= @_name %> {
<%- end -%>
}
<%- end -%>
<%- if @track_process -%>
<%- unless @track_process.empty? -%>

track_process {
<%- Array(@track_process).each do |track| -%>
<%- @track_process.each do |track| -%>
<%= track %>
<%- 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