Mcollective does not need sudo to work properly
Mcollective will always run with sudo, see: lib/proxy/puppet/mcollective.rb. When MCollective is configured properly, sudo is not needed to run the MCollective client.
1) Remove the following line from lib/proxy/puppet/mcollective.rb:
2) Implementing option 1 will probably break mcollective support for people who configured MCollective in such a way that sudo is needed. Instead of removing the sudo line it would be nice to have a parameter which enables/disables the sudo command for mcollective.
#2 Updated by Greg Petras about 8 years ago
As Jasper mentioned, this will break MCollective for people who need the sudo piece. We're using Puppet Enterprise, which automatically sets up everything for MCollective under the peadmin account. I opened an issue here to add some logic around the sudo call: