On Thu, Sep 5, 2013 at 2:31 PM, Jeff McCune <j...@puppetlabs.com> wrote:
> > I mentioned a site module. Consider this example. What is the result? > > 1 class site::motd($template = 'site/motd') { > 2 notify { 'motd': message => "template is $template" } > 3 } > 4 > 5 class goal { > 6 notify { "site::motd::template": > 7 message => "::site::motd::template is ${::site::motd::template} > (should be ${::node_template})" > 8 } > 9 } > 10 > 11 class container { > 12 contain('site::motd') > 13 } > 14 > 15 node default { > 16 $node_template = 'site/motd.jeff' > 17 class { 'container': } > 18 -> class { 'goal':} > 19 > 20 class { 'site::motd': template => $node_template } > 21 } > > The result I expect is that the class declaration on line 20 trumps all > other includes because it is the most specific regarding explicit class > parameters. > Your example fails either way. If contain doesn't call include, then site::motd is not in the catalog at the time contain is evaluated so the function call fails. -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+unsubscr...@googlegroups.com. To post to this group, send email to puppet-dev@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-dev. For more options, visit https://groups.google.com/groups/opt_out.