andyr7777777@gmail.com
2009-Apr-23 18:27 UTC
[Puppet Users] generate problem command runs on server not client
How can I get generate to run the command on the client, not the
server.
I have the following
class exports {
$dirs = generate("/bin/sh","-c","/bin/mount -t
ext3,xfs")
file { "exports.test":
name => "/etc/exports.test",
content => template("exports.erb")
}
}
And when run on the client, I get the same results that I get when run
on the server. It seems that generate should run the command on the
client, otherwise it isn''t very useful.
Thanks,
Andy
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Evan Hisey
2009-Apr-24 03:45 UTC
[Puppet Users] Re: generate problem command runs on server not client
On Thu, Apr 23, 2009 at 1:27 PM, andyr7777777@gmail.com <andyr7777777@gmail.com> wrote:> > How can I get generate to run the command on the client, not the > server. > > I have the following > > class exports { > $dirs = generate("/bin/sh","-c","/bin/mount -t ext3,xfs") > file { "exports.test": > name => "/etc/exports.test", > content => template("exports.erb") > } > } > > And when run on the client, I get the same results that I get when run > on the server. It seems that generate should run the command on the > client, otherwise it isn''t very useful. > > Thanks, > > Andy >Generate runs on the server. it is actually a pretty useful tool that way. For instance, it lets you have a dynamical produce file or template content outside of the puppet manifest and then return that information into a puppet. For what you are doing you might want to use a facter fact so that the information is available to the puppet to instead of using generate. Evan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
genanr@allantgroup.com
2009-Apr-24 15:43 UTC
[Puppet Users] Re: generate problem command runs on server not client
On Apr 23, 10:45 pm, Evan Hisey <ehi...@gmail.com> wrote:> > Generate runs on the server. it is actually a pretty useful tool that > way. For instance, it lets you have a dynamical produce file or > template content outside of the puppet manifest and then return that > information into a puppet. For what you are doing you might want to > use a facter fact so that the information is available to the puppet > to instead of using generate. > > EvanThanks, that I''ll add a facter fact. Andy --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---