Hi All, I have a module called "openvpn" which lives in /etc/puppet/modules/openvpn/. It just sets up generic OpenVPN stuff. I then set-up another class called s_jumpbox::openvpn, which lives in /etc/puppet/services/s_jumpbox/manifests/openvpn.pp. Inside this latter class, I did an "include openvpn" and for several resources, I set it to: require => Class["openvpn"] This confused Puppet, as it created a dependency on itself thinking I was referring to s_jumpbox::openvpn, which is not the case. Is this how it''s supposed to work? Regards Gonzalo -- 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 7 December 2011 23:09, Gonzalo Servat <gservat@gmail.com> wrote:> Hi All, > > I have a module called "openvpn" which lives in > /etc/puppet/modules/openvpn/. It just sets up generic OpenVPN stuff. I then > set-up another class called s_jumpbox::openvpn, which lives in > /etc/puppet/services/s_jumpbox/manifests/openvpn.pp. > > Inside this latter class, I did an "include openvpn" and for several > resources, I set it to: > > require => Class["openvpn"] > > This confused Puppet, as it created a dependency on itself thinking I was > referring to s_jumpbox::openvpn, which is not the case. > > Is this how it''s supposed to work? > > Regards > Gonzalo > > Pretty sure I''ve done this before and haven''t had it do that.Could you try specifying the namespace? e.g. ::openvpn What puppet version are you running? -- 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 Fri, Dec 9, 2011 at 6:50 AM, Adam Gibbins <adam@adamgibbins.com> wrote:> On 7 December 2011 23:09, Gonzalo Servat <gservat@gmail.com> wrote: >> >> Is this how it''s supposed to work? >> >> Pretty sure I''ve done this before and haven''t had it do that. > Could you try specifying the namespace? e.g. ::openvpn >As in Class["::openvpn"] ? Tried this but Puppet didn''t like it. Everything started working as soon as I renamed the second OpenVPN class to s_jumpbox::ovpn, but I don''t understand why they clash!> What puppet version are you running? >2.7.6 - Gonzalo -- 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 Dec 8, 3:36 pm, Gonzalo Servat <gser...@gmail.com> wrote:> On Fri, Dec 9, 2011 at 6:50 AM, Adam Gibbins <a...@adamgibbins.com> wrote: > > On 7 December 2011 23:09, Gonzalo Servat <gser...@gmail.com> wrote: > > >> Is this how it''s supposed to work? > > >> Pretty sure I''ve done this before and haven''t had it do that. > > Could you try specifying the namespace? e.g. ::openvpn > > As in Class["::openvpn"] ? Tried this but Puppet didn''t like it.I would file a bug report about that. It was supposed to be valid, last I knew, and it is anyway necessary for resolving ambiguities such as yours.> Everything > started working as soon as I renamed the second OpenVPN class to > s_jumpbox::ovpn, but I don''t understand why they clash!Puppet supports refering to classes by relative name, where (IIRC) that name can be relative to any enclosing namespace. My recollection is more uncertain on this, but I think Puppet searches namespaces from the innermost enclosing one to the outermost (certainly that''s consistent with your observation). Supposing I''ve got that right, then, here''s how the name resolution went for you: 1) look for class openvpn in namespace ::s_jumpbox::openvpn (i.e. ::s_jumpbox::openvpn::openvpn) [not found] 2) look for class openvpn in namespace ::s_jumpbox (i.e. ::s_jumpbox::openvpn) [we have a winner] Not reached: 3) look for class openvpn in namespace :: (i.e. ::openvpn) John -- 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.