Is it possible to specify more than two search items in a Resource Collectors tag?

7 views
Skip to first unread message

Brent Clark

unread,
Mar 7, 2014, 6:58:33 AM3/7/14
to puppet...@googlegroups.com
Good day Guys.

Is it possible to specify more than two search items in a Resource
Collectors tag?

e.g.
@@nagios_service {"${::chshostname}_${name}":
ensure => present,
check_command => $command,
host_name => $::chshostname,
servicegroups => $t_group,
service_description => $t_service_description,
use => $use_template,
target => $t_target,
tag => [$t_tag,$nagios::param::nagiosdc]
}

Nagios_service <<| tag == [$t_tag,$nagios::param::nagiosdc] |>> {
notify => Service['nagios3'],
require => Package['nagios3'],
}

I need to puppet to search for a particular service in a particular
datacentre.

Regards
Brent

Craig Dunn

unread,
Mar 7, 2014, 7:06:55 AM3/7/14
to puppet...@googlegroups.com

You can use and/or operators in collectors

Resource <| some == 'condition' and other == 'thing' |>

Regards
Craig




Brent

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/5319B469.3000406%40gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
Enviatics | Automation and configuration management
http://www.enviatics.com | @Enviatics
Puppet Training http://www.enviatics.com/training/

Reply all
Reply to author
Forward
0 new messages