Thanks John,
Unfortunately, we're using Foreman in our shop for the ENC, so using Hiera
is currently not possible (AFAIK)
For some reason, I thought the "require" statement was analogous to the
"require" metaparameter. But looking at the documentation, clearly that's
not the case. Still, this seems like a bug to me. If this is a duplicate
declaration, shouldn't it error regardless of the ordering within the
manifest?
Anyways, would writing something like this work?
class { "foo::bar":
Class["foo:baz"] -> Class["foo::bar"]
}
On Friday, November 15, 2013 5:27:11 PM UTC-5, jcbollinger wrote:
>
>
>
> On Friday, November 15, 2013 10:08:54 AM UTC-6, Jon McKenzie wrote:
>>
>> Has anyone run into this issue before?
>> http://projects.puppetlabs.com/issues/5046#note-17
>>
>> Is there something obvious that I'm missing?
>>
>
>
> Yes. The 'require' function is a form of class declaration, functionally
> equivalent to 'include' + an automatic relationship. You therefore do have
> multiple declarations of class foo::baz: one in foo::bar and one in
> foo::bam. As long as the parameterized-style declaration is evaluated
> first, all is well, but otherwise you will get a duplicate declaration
> error.
>
> This general problem is one of my principal reasons for advising folks to
> not use parameterized-style class declarations, as I have done since
> parameterized classes were introduced. In Puppet 3 you can usefully create
> and use parameterized classes without using parameterized-style
> declarations by relying on automatic parameter binding through Hiera.
>
>
> John
>
>
--
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/813a4c7c-f7b8-4d9a-9620-430a8c2f307d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.