(Puppet 0.25.4). Is there an easy way of doing a puppet client run with just one class, so I can test it? I''ve inherited an old, crufty puppet setup with lots of classes, and I want to go through each class one by one and watch the puppet client running against puppetd. Thanks, Sonia. -- 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 Mon, Feb 27, 2012 at 4:13 PM, Sonia Hamilton <sonia@snowfrog.net> wrote:> (Puppet 0.25.4). > > Is there an easy way of doing a puppet client run with just one class, > so I can test it? > > I''ve inherited an old, crufty puppet setup with lots of classes, and I > want to go through each class one by one and watch the puppet client > running against puppetd. > > Thanks, Sonia.Rather than trying to do this in agent/master, probably much easier to replicate all your modules to your agent for testing. I think you can run: puppet -e "include ''sample'' " --noop ... In 2.6+ should be: puppet apply -e "class { ''sample'': }" --noop Most likely your modules will have interdependencies between each other, so it probably won''t be this straightforward. If the authors of the modules provided tests directories and manifests in them, maybe you can run against them instead. HTH, 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.
* Nan Liu <nan@puppetlabs.com> [2012-02-27 17:02:49 -0800]:> On Mon, Feb 27, 2012 at 4:13 PM, Sonia Hamilton <sonia@snowfrog.net> wrote: > > (Puppet 0.25.4). > > > > Is there an easy way of doing a puppet client run with just one class, > > so I can test it? > > > > I''ve inherited an old, crufty puppet setup with lots of classes, and I > > want to go through each class one by one and watch the puppet client > > running against puppetd. > > > > Thanks, Sonia. > > Rather than trying to do this in agent/master, probably much easier to > replicate all your modules to your agent for testing. I think you can > run: > > puppet -e "include ''sample'' " --noop > ... > > In 2.6+ should be: > puppet apply -e "class { ''sample'': }" --noop > > Most likely your modules will have interdependencies between each > other, so it probably won''t be this straightforward. If the authors of > the modules provided tests directories and manifests in them, maybe > you can run against them instead.Thanks for your help Nan. I have some scripts setup that allow me to run my workstation as an adhoc puppetmaster, so I won''t try replicating my modules. Also, the key facts are pulled out of LDAP''ish backend, so "it''s complicated"... But the "puppet -e" trick looks good, I''ll try it later. If I have this heirarchy, what would I put in the include statement to run foo''s init.pp? puppet/ unstable/ modules/ foo/ manifests/ init.pp -- Sonia Hamilton http://www.snowfrog.net -- 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 Mon, Feb 27, 2012 at 6:50 PM, Sonia Hamilton <sonia@snowfrog.net> wrote:> * Nan Liu <nan@puppetlabs.com> [2012-02-27 17:02:49 -0800]: > >> On Mon, Feb 27, 2012 at 4:13 PM, Sonia Hamilton <sonia@snowfrog.net> wrote: >> > (Puppet 0.25.4). >> > >> > Is there an easy way of doing a puppet client run with just one class, >> > so I can test it? >> > >> > I''ve inherited an old, crufty puppet setup with lots of classes, and I >> > want to go through each class one by one and watch the puppet client >> > running against puppetd. >> > >> > Thanks, Sonia. >> >> Rather than trying to do this in agent/master, probably much easier to >> replicate all your modules to your agent for testing. I think you can >> run: >> >> puppet -e "include ''sample'' " --noop >> ... >> >> In 2.6+ should be: >> puppet apply -e "class { ''sample'': }" --noop >> >> Most likely your modules will have interdependencies between each >> other, so it probably won''t be this straightforward. If the authors of >> the modules provided tests directories and manifests in them, maybe >> you can run against them instead. > > Thanks for your help Nan. I have some scripts setup that allow me to run > my workstation as an adhoc puppetmaster, so I won''t try replicating my > modules. Also, the key facts are pulled out of LDAP''ish backend, so > "it''s complicated"... > > But the "puppet -e" trick looks good, I''ll try it later. If I have this > heirarchy, what would I put in the include statement to run foo''s > init.pp? > > puppet/ > unstable/ > modules/ > foo/ > manifests/ > init.ppI can''t say for sure without seeing the content of the file. I''m guessing unstable is an environment or it''s part of the puppet modulepath. If not, you need to specify modulepath=puppet/unstable/modules/. Ideally, the modules should follow the autoloader convention and the example above should be simply class or define foo, but I''ve seen enough modules that don''t follow the rules (especially ones with import statements) so you really need to check it on a case by case basis. 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.