Cristian Măgherușan-Stanciu
2012-May-22 16:42 UTC
[Puppet Users] How to create run stages from an ENC?
Hello, Is there a way to create run stages using just an ENC? If so, how would it look like in YAML format? I was thinking about something like this, but the YAML parser we use doesn''t accept it and a colleague of mine said that maybe Puppet support for this is missing too. Is it true? stages: yum: before: ''main'' # and then it could be used like this: classes: yum: stage: ''yum'' # this works already as expected and the stage is getting passed to the yum class, but how do I get the stage created from the ENC? Thanks, Cristian -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Tue, May 22, 2012 at 9:42 AM, Cristian Măgherușan-Stanciu <cristi.magherusan@gmail.com> wrote:> Hello, > > Is there a way to create run stages using just an ENC? If so, how > would it look like in YAML format? > > I was thinking about something like this, but the YAML parser we use > doesn''t accept it and a colleague of mine said that maybe Puppet > support for this is missing too. Is it true? > > stages: > yum: > before: ''main'' > > # and then it could be used like this: > classes: > yum: > stage: ''yum'' # this works already as expected and the stage is > getting passed to the yum class, but how do I get the stage created > from the ENC?Stages are like resources, and resources can''t be declared directly in the ENC. However you can create a parameter that contains a hash of the stage, and use create_resource to declare it. Here''s an old thread which talks about this in more details: https://groups.google.com/d/topic/puppet-users/2f4SBM-_-ws/discussion Thanks, Nan -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.