From 8a1f990306da80628d276f5ea7fdea145471901f Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Tue, 12 Mar 2024 14:23:06 +0100 Subject: [PATCH] vrrp::instance: track_process: Switch default undef->[] --- REFERENCE.md | 2 +- manifests/vrrp/instance.pp | 2 +- templates/vrrp_instance.erb | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index 4a398e703..33cadb7ca 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -1203,7 +1203,7 @@ Default value: `undef` ##### `track_process` -Data type: `Optional[Array[String[1]]]` +Data type: `Array[String[1]]` Define which process trackers to run. diff --git a/manifests/vrrp/instance.pp b/manifests/vrrp/instance.pp index 686ae977e..26d980750 100644 --- a/manifests/vrrp/instance.pp +++ b/manifests/vrrp/instance.pp @@ -206,7 +206,7 @@ $auth_type = undef, Optional[Variant[String, Sensitive[String]]] $auth_pass = undef, $track_script = undef, - Optional[Array[String[1]]] $track_process = undef, + Array[String[1]] $track_process = undef, Array[String[1]] $track_file = [], Array[String[1]] $vrrp_track_file = [], $track_interface = undef, diff --git a/templates/vrrp_instance.erb b/templates/vrrp_instance.erb index eb1d6f6bc..f56221406 100644 --- a/templates/vrrp_instance.erb +++ b/templates/vrrp_instance.erb @@ -105,10 +105,10 @@ 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 -%> }