This works (was added sometime during 2.6 cycle I think).

class foo ($stage = main) {
  ...
}

include foo
On Dec 14, 2012 9:52 PM, "Jakov Sosic" <jso...@srce.hr> wrote:

> Hi.
>
> I am wondering why can't run stages get set inside the class?
>
> For example:
>
> class foo {
>   stage main
> }
>
> Because, if I want to use stages, I have to declare my class as
> parametrized => so I can't use include or require anywhere else...
>
> I thought of a different approach, like:
>
> class foo_wrapper {
>   class{ 'foo': stage => 'somestage' }
> }
>
> but would it work if I later include/require foo_wrapper in more than
> one place? And is this code ok?
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to