Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Please qualify the command or specify a path." #10

Closed
ghantoos opened this issue May 1, 2012 · 2 comments
Closed

"Please qualify the command or specify a path." #10

ghantoos opened this issue May 1, 2012 · 2 comments

Comments

@ghantoos
Copy link

ghantoos commented May 1, 2012

I was unable to apply the module as is. It returned the following error:

err: Failed to apply catalog: 'visudo -c -f /etc/sudoers.d/foo || ( rm -f /etc/sudoers.d/foo && exit 1)' is not qualified and no path was specified. Please qualify the command or specify a path.

A simple path qualification corrected this error.

diff --git a/manifests/directive.pp b/manifests/directive.pp
index 3ad5f02..e3db631 100644
--- a/manifests/directive.pp
+++ b/manifests/directive.pp
@@ -46,7 +46,7 @@ define sudo::directive (
   }

   exec {"sudo-syntax-check for file $dname":
-    command     => "visudo -c -f /etc/sudoers.d/${dname} || ( rm -f /etc/sudoers.d/${dname} && exit 1)",
+    command     => "/usr/sbin/visudo -c -f /etc/sudoers.d/${dname} || ( rm -f /etc/sudoers.d/${dname} && exit 1)",
     refreshonly => true,
   }

I am running Debian Squeeze on both puppet-master and agent.

Cheers,
Ignace M

@ghantoos
Copy link
Author

I have comited the changes on my cloned repo:
ghantoos@c78e284

Cheers

@mbornoz
Copy link
Member

mbornoz commented Jul 30, 2012

We prefer to specify a default "path" value in the global scope, see http://docs.puppetlabs.com/guides/language_guide.html#resource-defaults

I close this issue.

@mbornoz mbornoz closed this as completed Jul 30, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants