Hey,
short:
I have a problem with `validate_array()` from puppetlabs-stdlib (v4.10.0)
(https://github.com/puppetlabs/puppetlabs-stdlib/blob/4d1bca3359519e6303d9b3543c56426606c8eba3/lib/puppet/parser/functions/validate_array.rb)
An array with only one element returns an error like ... *is not an Array. It looks to be a String* ...
I try follow:
@@icinga2::object::apply_dependency { "dep_service2-${::fqdn}":
object_type => 'Service',
parent_host_name => $::fqdn,
states => [ 'Up',],
disable_notifications => true,
assign_where => "\"host.name=='${::fqdn}\"",
tag=> 'neu6',
}
And then I collect this:
Icinga2::Object::Apply_dependency <<| tag=='neu6' |>> { }
I get follow error message:
Error 400 on SERVER: "Up" is not an Array. It looks to be a String at /etc/puppet/environments/production/modules/icinga2/manifests/object/apply_dependency.pp:45 ....
Now I change it to:
@@icinga2::object::apply_dependency { "dep_service2-${::fqdn}":
object_type => 'Service',
parent_host_name => $::fqdn,
states => [ 'Up','Up'],
disable_notifications => true,
assign_where => "\"host.name=='${::fqdn}\"",
tag=> 'neu7',
}
and collect it again with:
Icinga2::Object::Apply_dependency <<| tag=='neu7' |>> { }
Now puppet agent -t runs fine.
line 45 of /etc/puppet/environments/production/modules/icinga2/manifests/object/apply_dependency.pp is
validate_array($states)
(https://github.com/Icinga/puppet-icinga2/blob/develop/manifests/object/apply_dependency.pp )
Is for function `validate_array()` from std_lib an array with only one element not an array?
Best regards,
thomas polnik.
↧