Hi, How to only execute the script from the server instead of first copying the file & then executing the script from puppet ? Thanks -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/UQzJIINQqYgJ. 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.
Dan White
2012-Apr-03 12:37 UTC
Re: [Puppet Users] How to execute a script from the server
But that is how it works. file{ "/etc/puppet/scripts": ensure => directory, owner => "root", group => "root", mode => 70oo; "/etc/puppet/scripts/checkUsers.bash": owner => "root", group => "root", mode => 700, source => "puppet:///modules/password/checkUsers.bash"; } exec{ "/etc/puppet/scripts/checkUsers.bash": user => "root", logoutput => true, require => File["/etc/puppet/scripts/checkUsers.bash"]; } ----- mac01 <smilemukul2005@gmail.com> wrote:> > Hi, > > How to only execute the script from the server instead of first copying the > file & then executing the script from puppet ? > > Thanks“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) -- 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.
Jeff McCune
2012-Apr-03 12:51 UTC
Re: [Puppet Users] How to execute a script from the server
On Apr 3, 2012, at 6:16 AM, mac01 <smilemukul2005@gmail.com> wrote:> > Hi, > > How to only execute the script from the server instead of first copying the file & then executing the script from puppet ?My answer depends on what you''re trying accomplish. If you''re trying to get some data to fill in a resource, then a function is a good choice. Generate() will likely do what you need. If you''re trying to manage something only on the server, I''d still model this as a file and exec resource so it shows up in your reports and configuration catalog. Hope this helps. -Jeff -- 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.