diff --git a/REFERENCE.md b/REFERENCE.md index 9133ea6f8..e3090815b 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -1229,7 +1229,7 @@ Default value: `[]` ##### `track_interface` -Data type: `Any` +Data type: `Array[String[1]]` Define which interface(s) to monitor. Go to FAULT state if one of @@ -1238,7 +1238,7 @@ May be specified as either: a) interface name b) array of interfaces names -Default value: `undef` +Default value: `[]` ##### `lvs_interface` diff --git a/manifests/vrrp/instance.pp b/manifests/vrrp/instance.pp index 7d1939cd9..19d1179e4 100644 --- a/manifests/vrrp/instance.pp +++ b/manifests/vrrp/instance.pp @@ -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, diff --git a/templates/vrrp_instance.erb b/templates/vrrp_instance.erb index 67b65db0a..ec4f88130 100644 --- a/templates/vrrp_instance.erb +++ b/templates/vrrp_instance.erb @@ -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 -%> }