Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to run a single module like this:

puppet apply --verbose --modulepath=moduleshere --noop -e 'include myclass'

However, I get this kind of error, indicating the path is not set

Parameter unless failed: '[ -e "${logfile}" ]' is not qualified and no path was specified. Please qualify the command or specify a path.

I don't want to explicitly specify the path in every such location, and it works fine when run as part of a full puppet run. How can I specify the path when running a single module?

share|improve this question
Could you please accept the appropriate answer? – kenorb Apr 3 '15 at 14:46

The commands in an Exec resource either have to be fully qualified (i. e. /usr/bin/test instead of test) or the path attribute of that Exec resource has to be set.

If you can modify the Puppet manifest(s) you can simply add the following definition for setting a default path attribute for all Exec resources to /bin:

Exec { path => "/bin" }

As a (more or less) dirty workaround you can also just set the default path for any Exec resource on the command line:

$ puppet apply --verbose -e 'Exec { path => "/bin" }' your_manifest.pp

Documentation pointers:

share|improve this answer

That.. shouldn't work as part of a full run. It needs a full path to the executable in the unless command. Maybe you've got a path set in a global file that's part of your full runs?

Try unless => '/usr/bin/[ -e "${logfile}" ]', instead.

share|improve this answer

I agree with Shane that the default path is probably set in a globally scoped manifest. You could do the same but you can't pass it as an argument, so either use stdin:

$ puppet apply -v --modulepath=moduleshere --noop <<EOF
Exec { path => "/bin:/sbin:/usr/bin:/usr/sbin" }
include myclass

or put the Exec and include lines into example.pp and then use puppet apply -v ... example.pp.

share|improve this answer

You need to use fully qualified path.

For example either:

exec { "sample":
  command => "/usr/bin/test",


exec { "sample":
  path    => ['/usr/bin', '/usr/sbin', '/bin'],
  command => "test",
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.