Larry Ludwig
2008-Jul-09 20:41 UTC
[Puppet Users] using puppet and command line parameters?
I would like to use puppet (not puppetd or puppetmaster mind you) to perform some local system admin stuff. I want to do things like puppet ARG1 ARG2.... Which then can be used in the puppet recipe. package {"${ARG1}": ensure => installed, } Is this possible? I need to pass options to the puppet recipe. ''facter'' isn''t an option since I"m making nagios config files for other servers. Yes I realize puppet can do this with storedconfigs, but storedconfigs causes our setup to be very unstable. So while I am waiting for a newer release of puppetmaster, I would like to automate our nagios setup in some fashion. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Andrew Shafer
2008-Jul-09 20:54 UTC
[Puppet Users] Re: using puppet and command line parameters?
I think ralsh might be what you are looking for On Wed, Jul 9, 2008 at 2:41 PM, Larry Ludwig <larrylud@gmail.com> wrote:> > I would like to use puppet (not puppetd or puppetmaster mind you) to > perform some local system admin stuff. > > I want to do things like > > puppet ARG1 ARG2.... > > > Which then can be used in the puppet recipe. > > package {"${ARG1}": > ensure => installed, > } > > Is this possible? I need to pass options to the puppet recipe. > > ''facter'' isn''t an option since I"m making nagios config files for > other servers. Yes I realize puppet can do this with storedconfigs, > but storedconfigs causes our setup to be very unstable. So while I am > waiting for a newer release of puppetmaster, I would like to automate > our nagios setup in some fashion. > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Larry Ludwig
2008-Jul-10 01:09 UTC
[Puppet Users] Re: using puppet and command line parameters?
On Jul 9, 4:54 pm, "Andrew Shafer" <and...@reductivelabs.com> wrote:> I think ralsh might be what you are looking for >What''s ralsh? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Larry Ludwig wrote:> > On Jul 9, 4:54 pm, "Andrew Shafer" <and...@reductivelabs.com> wrote: > >> I think ralsh might be what you are looking for >> >> > > What''s ralsh? > >ralsh: Use the Puppet RAL to directly interact with the system. aj@junglist (branch: master) ~/www/junglist/config$ ralsh user aj user { ''aj'': home => ''/home/aj'', comment => ''AJ Christensen,,,'', shell => ''/bin/bash'', uid => ''1000'', gid => ''1000'', password => ''absent'', groups => [''adm'',''dialout'',''cdrom'',''floppy'',''audio'',''dip'',''www-data'',''video'',''plugdev'',''scanner'',''lpadmin'',''admin''], ensure => ''present'' } aj@junglist (branch: master) ~/www/junglist/config$ ralsh file ~/www/junglist/config/ file { ''/home/aj/www/junglist/config'': type => ''directory'', mode => ''493'', group => ''1000'', checksum => ''{mtime}Thu Jul 10 10:50:15 +1200 2008'', content => '''', owner => ''1000'', ensure => ''directory'' } etc, etc. I''m not certain ralsh is actually what you''re looking for :} --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
James Turnbull
2008-Jul-10 01:33 UTC
[Puppet Users] Re: using puppet and command line parameters?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 AJ wrote: | I''m not certain ralsh is actually what you''re looking for :} But it''s cool... :P Regards James Turnbull - -- Author of: * Pulling Strings with Puppet (http://www.amazon.com/gp/product/1590599780/) * Pro Nagios 2.0 (http://www.amazon.com/gp/product/1590596099/) * Hardening Linux (http://www.amazon.com/gp/product/1590594444/) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIdWbU9hTGvAxC30ARApjYAKCNat2vC9jVqEGi3YBh0p8Jx3/84gCfX2UV CF+9deXbPR8llggTmN170LM=7zid -----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 -~----------~----~----~----~------~----~------~--~---
tung dang
2008-Jul-10 01:41 UTC
[Puppet Users] Re: using puppet and command line parameters?
On Thu, Jul 10, 2008 at 3:41 AM, Larry Ludwig <larrylud@gmail.com> wrote:> > I would like to use puppet (not puppetd or puppetmaster mind you) to > perform some local system admin stuff. > > I want to do things like > > puppet ARG1 ARG2.... > > > Which then can be used in the puppet recipe. > > package {"${ARG1}": > ensure => installed, > }I think you can use: *puppetd --tags yourtag* *yourtag *is name of resource you want to execute (in this case *package *resource). I did like that. Regards TungDH --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
tung dang wrote:> > > On Thu, Jul 10, 2008 at 3:41 AM, Larry Ludwig <larrylud@gmail.com > <mailto:larrylud@gmail.com>> wrote: > > > I would like to use puppet (not puppetd or puppetmaster mind you) to > perform some local system admin stuff. > > I want to do things like > > puppet ARG1 ARG2.... > > > Which then can be used in the puppet recipe. > > package {"${ARG1}": > ensure => installed, > } > > > I think you can use: > /puppetd --tags yourtag/ > /yourtag /is name of resource you want to execute (in this case > /package /resource). > I did like that. > Regards > TungDHYou can kinda achieve this data passing with environment variables, no? aj@junglist (branch: master) ~/git/facter$ facter_foo=bar facter foo bar facter_arg1=foo facter_arg2=bar puppetd --test Regards, AJ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
AJ wrote:> tung dang wrote: > >> On Thu, Jul 10, 2008 at 3:41 AM, Larry Ludwig <larrylud@gmail.com >> <mailto:larrylud@gmail.com>> wrote: >> >> >> I would like to use puppet (not puppetd or puppetmaster mind you) to >> perform some local system admin stuff. >> >> I want to do things like >> >> puppet ARG1 ARG2.... >> >> >> Which then can be used in the puppet recipe. >> >> package {"${ARG1}": >> ensure => installed, >> } >> >> >> I think you can use: >> /puppetd --tags yourtag/ >> /yourtag /is name of resource you want to execute (in this case >> /package /resource). >> I did like that. >> Regards >> TungDH >> > You can kinda achieve this data passing with environment variables, no? > > aj@junglist (branch: master) ~/git/facter$ facter_foo=bar facter foo > bar > > facter_arg1=foo facter_arg2=bar puppetd --test > > Regards, > > AJ >Sorry if I wasn''t clear: aj@junglist /tmp$ cat test.pp #!/usr/bin/env puppet notify { $foo: } aj@junglist /tmp$ facter_foo=bar ./test.pp notice: bar Regards, AJ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Larry Ludwig
2008-Jul-10 13:59 UTC
[Puppet Users] Re: using puppet and command line parameters?
Yea this sounds like a feature request to me. Submitting one right now. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---