On 17-11-11 11:51, Martijn Grendelman wrote:
> Hi,
>
> Is there a way to 'unique-ify' a collection of resources?
>
> Suppose that nodes export '@@nagios_hostgroup' resources for hostgroups
> that they want to be a member of. The Nagios server node collect those:
>
> Nagios_hostgroup <<||>>
>
> But many nodes export the same hostgroups, because the whole point of
> having hostgroups is, that multiple hosts can be a member :-) So, the
> collection would lead to duplicate definitions. Is there a way to avoid that?
By Googling a bit, and reading some old stuff from the list, I got the
impression that it might be possible to just collect all those resources
without problems. So I set up a simple test case:
class testexport {
@@file {"/tmp/blub":
content => "fiep\n",
}
}
class testcollect {
File <<| tag == "testexport" |>>
}
node serverA {
include testexport
}
node serverB {
include testexport
}
node serverC {
include testcollect
}
As expected, on serverC, this leads to the following error:
err: Could not retrieve catalog from remote server: Error 400 on SERVER:
Exported resource File[/tmp/blub] cannot override local resource on node
serverC
Is there a way around this?
Best regards,
Martijn Grendelman
--
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.