Hi, in every classes I created, I defined a variable (named $version) to include a kind of versionning inside them. In puppetd sources, around network/client/master.rb:293 , the ''setclasses'' function log the classes in a ''classfile'' (here : $statedir/classes.txt). I''d just like to add classes $version numbers in that file. Anyone know how to access a variable inside a class ? Regards, -- 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.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1> in every classes I created, I defined a variable (named $version) to > include a kind of versionning inside them. > > In puppetd sources, around network/client/master.rb:293 , the > ''setclasses'' function log the classes in a ''classfile'' (here : > $statedir/classes.txt). I''d just like to add classes $version numbers > in that file. > > Anyone know how to access a variable inside a class ?there is the config_version option http://docs.reductivelabs.com/references/stable/configuration.html#config-version which gives you the possibility to give the possibility to generate a certain version for the current used manifests. this should be sufficient to get what you like. I don''t see why you''d like to have a per class version... cheers pete -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktgsI8ACgkQbwltcAfKi3/wPACgitgAxlnwAqeRcdJ9OVRn6DpB UvoAn3Btqpo9JORNUgA1Alt+Eqmf1ALJ =vO6b -----END PGP SIGNATURE----- -- 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 1/27/10 12:28 PM, Arnauld wrote:> Anyone know how to access a variable inside a class ? >I and many others have overcome this by using Puppet environments. If I make a change to a module, I simply push out another environment and tell clients that need the change to use that environment. Also I believe there is work to implement module or class metadata which may provide what you''re looking for--but I''m not sure how far off that is. -scott -- 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.
> there is the config_version optionhttp://docs.reductivelabs.com/references/stable/configuration.html#co... > which gives you the possibility to give the possibility to generate a > certain version for the current used manifests.Great ! I think it''s the thing I need :) Thanks a lot, -- 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.
> Also I believe there is work to implement module or class metadata which may provide what you''re > looking for--but I''m not sure how far off that is.So do I. And I think there''s really a need here. -- 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.
I use a combination of both solutions to achieve a similar result. I tag modules based on internal development cycle, and then I put them all on a directory on the server (e.g. /etc/puppet/modules/stable). each module would have a version as a suffix (e.g. ssh_1.5) then I automatically build environments, which just have links to the right combination of models that i need. e.g. one production env might link ssh to /etc/puppet/modules/stable/ssh_1.5 and another to ssh_1.0. this allow me great flexibility to reuse and share the modules. hope this helps anyone. On Thu, Jan 28, 2010 at 6:50 PM, Arnauld <a.michelizza@gmail.com> wrote:> > > Also I believe there is work to implement module or class metadata which > may provide what you''re > > looking for--but I''m not sure how far off that is. > > So do I. > And I think there''s really a need here. > > -- > 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<puppet-users%2Bunsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.