exec: err: both unqualifed and specified no search path

382 views
Skip to first unread message

itsec

unread,
Sep 4, 2008, 4:16:09 PM9/4/08
to Puppet Users
Hi all

I have the following definition:

define download_file(
$site="",
$cwd="",
$user="") {

exec { $name:
command => "wget ${site}/${name}",
cwd => "${cwd}",
creates => "${cwd}/${name}",
user => "${user}",
}
}

By calling it with the following:
download_file {"ossec-hids-latest.tar.gz":
site => "http://www.ossec.net/files",
cwd => "/home/user/tmp/",
user => "user",
}

I get the following error message:
err: both unqualifed and specified no search path in file /etc/puppet/
manifests/test_download.pp at line 14

Does anybody know how to resolve that?

--
Thanks for any help.
Best regards,
Mike

RijilV

unread,
Sep 4, 2008, 5:13:32 PM9/4/08
to puppet...@googlegroups.com
2008/9/4 itsec <itsec.l...@gmail.com>:


You need to either say '/path/to/wget' or give a search path to exec
like 'path => ["/bin", "/sbin", "/usr/bin", "/usr/sbin"]'.

Generally speaking I advocate setting a default search path at the top
of your site.pp:

Exec {
path => ["/bin", "/sbin", "/usr/bin", "/usr/sbin"],
}

And you won't have to worry about it thereafter.

.r'

Reply all
Reply to author
Forward
0 new messages