2018-06-05 15:01 GMT+02:00 jcbollinger <john.bollin...@stjude.org>:

>
>
> On Monday, June 4, 2018 at 1:06:52 PM UTC-5, Ramin K wrote:
>>
>> On 6/4/18 8:25 AM, Peter Berghold wrote:
>> > I was looking at someone else's code one day last week and saw a
>> pattern
>> > I've not seen before. Maybe that's what I get for developing Puppet
>> code
>> > in a vacuum. :-)
>> >
>> > class someclass (
>> >      $parm1 = $::someclass::params::parm1,
>> >      $parm2 = $::someclass::params::parm2       # so far I get it.
>> > ) inherits someclass::params {             # ok, I get it
>> >
>> >       class{'someclass::package': }        # OK
>> >       -> class('someclass::configure':}    # right...
>> >       -> Class{'someclass':}                    #  HUH?  What does that
>> do?
>> > }
>> >
>> > Is that last step necessary and why?
>>
>>
>> The last step was fairly common in Puppet 2.7 code before Anchors.
>
>
>
> Are you sure about that, Ramin?  I've been around Puppet since well before
> v2.7, and to the best of my knowledge, Class{'someclass':} (with capital
> 'C') is and always has been syntactically invalid.  I'm prepared to learn
> something new today, but you'll need to point me to some docs to support
> your assertion.
>

I've been using that syntax in 3.8 for a long time:

  contain ::soge::install
  contain ::soge::configure
  contain ::soge::service

  Class ['::soge::install'] ->
  Class ['::soge::configure'] ~>
  Class ['::soge::service']

Maybe this ->
https://blog.mayflower.de/4573-The-Puppet-Anchor-Pattern-in-Practice.html

I remeber start using it when the contain function was released...

( fun fact: https://groups.google.com/forum/#!topic/puppet-users/T1cIUuKBU0E
isn't this you using "Class"? or am I missing something?

Best,
Arnau


>

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAM69jx8ne4QP9mHaGO59Bz7iTWhBATnjrLtER7Cj5xXPc8hvmQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to