Issue #16907 has been updated by Josh Cooper. Description updated Status changed from Unreviewed to Needs More Information Priority changed from High to Normal
Hi Sandra, the prerun & postrun commands are intended to be executed on the agent before/after it retrieves and applies a catalog. It sounds like you're wanting something to execute on the server, in which case, you may want to use a function instead. On 2.7.x, I see the prerun command being executed correctly: <pre> $ puppet agent --no-daemonize --listen --debug --prerun_command=/usr/bin/false --noop --server sirrus ... notice: Starting Puppet client version 2.7.19 debug: Using cached certificate for ca debug: Using cached certificate for sirrus debug: Using cached certificate for ca debug: Using cached certificate_revocation_list for ca debug: Executing '/usr/bin/false' err: Could not run command from prerun_command: Execution of '/usr/bin/false' returned 1: </pre> ---------------------------------------- Bug #16907: prerun_command option in puppet.conf doesn't work https://projects.puppetlabs.com/issues/16907#change-73113 Author: Sandra Schlichting Status: Needs More Information Priority: Normal Assignee: Category: Target version: Affected Puppet version: 2.7.19 Keywords: Branch: If I use puppet.conf as <pre> [main] logdir = /var/log/puppet rundir = /var/run/puppet ssldir = $vardir/ssl [agent] classfile = $vardir/classes.txt localconfig = $vardir/localconfig prerun_command = /bin/false </pre> or <pre> [main] logdir = /var/log/puppet rundir = /var/run/puppet ssldir = $vardir/ssl prerun_command = /bin/false [agent] classfile = $vardir/classes.txt localconfig = $vardir/localconfig </pre> and then on a node do <pre> puppet agent --listen --test --noop </pre> then it doesn't fail, as I would have expected. My purpose for this is to execute a script on the puppetmaster everytime a node tries to connect. -- 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.
