itsec
2008-Sep-04 20:16 UTC
[Puppet Users] exec: err: both unqualifed and specified no search path
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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---
RijilV
2008-Sep-04 21:13 UTC
[Puppet Users] Re: exec: err: both unqualifed and specified no search path
2008/9/4 itsec <itsec.listuser@gmail.com>:> > 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?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'' --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---