Answering myself on this one: the described behaviour is expected. Many thanks to Henrik for his input on this.
Background: when collecting all exported resources the parser uses a “shortcut” and does not inspect all exported resources. When collecting a subset only, the parser needs to inspect all exported resources to analyse what to collect and what not. Fix: set a sane default for all parameters in exported resources. - Martin On 20 Jan 2015, at 16:02, Martin Alfke <[email protected]> wrote: > Hi, > > I have the following code: > > define monitor::host ( > $target, > $monitortag = $::domain, > ) { > } > … > } > > The define gets exported on all nodes: > > @@monitor::host { $::fqdn: } > > And I collect on the monitor server: > > Monitor::Host <<| |>> { > target => ‘/full path to config’, > } > > This is working as expected > > No I want to collect from a specific monitortag only: > > Monitor::Host <<| monitortag == ‘foo.com’ |>> { > target => ‘/full path to config’, > } > > Now we receive an error message on the host where we collect claiming that > target is not set. > > Is this known behaviour? > > Many thanks, > > Martin > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20A8AC8E-1C1D-4040-A4BE-49EFD0F3379E%40gmail.com. For more options, visit https://groups.google.com/d/optout.
