Hi, I have a file foo.sh which is basically a library of various bash functions. Is there a way to execute these functions from puppet? --Steffen -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
i think the ''exec'' builtin type will help you. http://docs.puppetlabs.com/references/2.7.latest/type.html#exec On Wed, Mar 20, 2013 at 6:03 AM, Steffen Vulpius <steffen.vulpius@gmail.com>wrote:> Hi, > > I have a file foo.sh which is basically a library of various bash > functions. Is there a way to execute these functions from puppet? > > --Steffen > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- 一片树林里分出两条路—— 而我选择了人迹更少的一条, 从此决定了我一生的道路。 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
On Tue, Mar 19, 2013 at 6:03 PM, Steffen Vulpius <steffen.vulpius@gmail.com> wrote:> I have a file foo.sh which is basically a library of various bash functions. > Is there a way to execute these functions from puppetCorrect me if I''m wrong, but you have a file foo.sh, that defines a bash function called bar, and you want to execute bar from inside a puppet exec resource? I don''t think that as such is possible. One creative thing that you might be able to do (I haven''t tested this at all) is to make a bunch of symlinks to foo.sh (bar, baz, whatever) for the functions in your library, and in the main part, look at $0 to see what you should do. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.