Hello,
I''m fairly new to Puppet. I''m trying to setup some Nagios
checks for
systems that have additional vhosts or aliases assigned to them (Nagios is
already setup and running without issue). In my node manifest, I have
defined:
$nagios_http_alias_check = ["foo1","foo2","foo3"]
And in my apache class I have:
# in case there is no aliases listed, just use the hostname
$nagios_http_alias_list = default_value($nagios_http_alias_check,$hostname)
define create_nagios_http_checks {
@@nagios_service {"check-http_$nagios_http_alias_list":
use => ''check-http'',
host_name => $nagios_http_alias_list,
servicegroups => ''all-service-checks,http-checks''
}
}
create_nagios_http_checks { $nagios_http_alias_list: }
However, when I run puppet, I get an error due to the
$nagios_http_alias_list mashing all the strings into one:
Duplicate definition: Nagios_service[check-http_foo1foo2foo3] is already
defined in file
I know I''m doing something stupid, but I can''t figure it out.
Any help
greatly appreciated.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/hQp86NpHAoIJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.