hyperlink - Puppet exec: shell command returns "could not find command" -


it's first time i'm using exec puppet i'm not sorting out why continues returning errors. command i'm executing consists in series of symbolic link creations, code is:

exec { "creation_of_symbolic_links":      command => "ln -s link1dest link1name; ln -s link2dest link2name; ... ; ln -s linkndest linknname",      path => "/etc", #added in order delete error } 

all linkdests , linknames absolute paths. error returned is:

error: not find command 'ln'

error: /stage[main]/main/node[nodename]/exec[creation_of symbolic_links]/returns: change notrun 0 failed: not find command 'ln'

how can avoid error?

please read meaning of path parameter in exec resource. got error because path not defined. try using:

path =>  [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/' ] 

Comments