Issue #1268 has been updated by Nick Fagerlund.
Status changed from Accepted to Closed
I think this is mostly dealt with as of the docs changes made for issue
#8302... and more to the point, the exec provider split in #4884 kind of makes
it self-documenting -- posix execs aren't in any shell at all, and shell execs
happen in a standard instance of `/bin/sh`. (Especially since the shell
provider pretty much gets rid of the double-escaping problem by calling
`/bin/sh -c "#{command.gsub(/"/,'\"')}"` -- you only have to worry about
protecting your quotes from Puppet itself.)
I'm closing the issue; please file new issues if the exec docs in the impending
2.6.10 release (and the following release in the 2.7 series) aren't sufficient.
----------------------------------------
Feature #1268: Improve the documentation of how exec works
https://projects.puppetlabs.com/issues/1268
Author: Simon Mudd
Status: Closed
Priority: Normal
Assignee: Nick Fagerlund
Category:
Target version:
Keywords:
Branch:
Affected URL:
The documentation regarding shell commands while reasonably complete doesn't
say various things:
1. Exactly how "command" is executed. This seems to be through the shell (which
one /bin/sh? /bin/bash?, can this be determined or influenced?)
2. How complex the command can be. Thus are all shell meta characters such as >
>> && & etc. allowed
3. Variable interpolation, both by puppet and the shell. I assume puppet
variables get evaluated first and this is what is passed to the shell to
evaluate. If we want to use shell variables must the $VARIABLE be escaped as
\$VARIABLE in order to reach the shell correctly as $VARIABLE?
4. Comments about which file descriptors command can assume are open (only
stdout/stderr? is stdin redirected?)
5. Any limits (command size limit) that puppet imposes on "command"
6. A comment regarding the best practice of:
1. making a large complex command, or
2. writing a separate script which is distributed by puppet from the master
and executed from command on the client
I think that for certain more complex actions which might be done inside puppet
this information would be invaluable.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.