Hello,
I am facing a strange behaviour with exported resources overriding in 0.25.5
(CentOS). I am using nagios with exported resources. In my base class, I define
a hostgroup by default for all nodes. In an apache vhost define, I override
this hostgroup to a value common to all webservers. This works.
But in another class, I use apache vhost define but I want to override another
time the hostgroup to set it to another value. This does not work, the
hostgroup for the host is set to the one for apache vhosts.
Is there a way to tell that the last resource override should happen after the
apache vhost define is applied ?
Here is what it looks like :
class nagios {
@@nagios_host { $fqdn:
ensure => present,
alias => $hostname,
address => $ipaddress,
use => "linux-server",
check_command => "check-host-alive",
max_check_attempts => 3,
hostgroups => "linux-servers",
contact_groups => "admins",
}
}
define apache::vhost ([...]){
[ยทยทยท]
Nagios_host<| title == $fqdn|> {
hostgroups => "webservers",
}
}
class specialized::host {
include apache
apache::vhost {"$fqdn":
[...]
}
Nagios_host <| title == $fqdn|> {
hostgroups => "cihosts",
contact_groups => "ciadmins",
require => File["/etc/nagios"],
}
}
node "myhost" {
include nagios
include specialized::host
}
Note, the contact_groups override works well.
Cheers,
Julien Garet
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.