On 10/22/2016 04:32 PM, Martin Alfke wrote:

This code is fine.
You just declare a stage resource type.
Except for: why do you want to make use of stages?
Stages have been introduced as a high level ordering concept which is no longer 
best practice.
You should use standard ordering instead (require, before, subscribe, notify or 
chaining pattern.

I divided my manifests into two parts:

First part sets up yum and repositories (before main), and

second part sets up everything else.


This frees me from depending my modules on some specific yum repository, and enables me to manage repositories separately from everything else.


my/manifests/conf.pp:
class my::conf (
 $stage = 'mystage',
) {
…
}

As the syntax validation states:
“stage” is a metaparameter and a reserved word in Puppet.
Your code example shows a parameterized class with “stage” as a parameter.

What I tried to achieve with this is to run class in a stage, without trying to define it in a resource-type definition...


Not think about the following declaration

class { ‘my::conf’:
  stage => ‘foo’,
}

What should puppet now use?

It should use 'foo' because params in class definition only define "default" value...

--
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/30be6196-e183-63a4-8f00-d8404a7289ea%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to