Puppet won't execute command
- by tom
Puppet 0.25.4 on ubuntu point blank refuses to execute the following command:
exec {"initiate replica set":
command => "echo 'rs.initiate()' | mongo",
path => ["/usr/bin","/usr/sbin","/bin"],
user => "root",
require => Class["mongodb"]
}
I can execute the command as root myself, so I'm guessing perhaps it's an issue with the shell. Unfortunately upgrading puppet isn't an option (and causes other issues anyway).
I've tried specifying explicit paths to the binaries instead of relying on the path parameter, and also changing the command to:
"bash -c \"echo 'rs.initiate()' | mongo\""
Still doesn't work.
Any ideas?
I get an error message saying something like "failed to change from notrun to 0"