我正在尝试在 Debian 6.0 上安装带有 puppet 2.7 的模块,但我不断收到此错误:
returns: change from notrun to 0 failed: Could not find command 'tar'
这是相关代码:
file {"zookeeper-tarball":
path => "${zookeeper_parent_dir}/${tarball}",
source => "puppet:///modules/zookeeper/${tarball}",
ensure => file,
}
exec { "zookeeper_untar":
path => "${zookeeper_parent_dir}",
command => "tar -xzf ${zookeeper_parent_dir}/${tarball}",
cwd => "${zookeeper_parent_dir}",
user => "$user",
require => File["zookeeper-tarball"],
creates => "${zookeeper_parent_dir}/zookeeper-${zookeeper_version}",
}
在manifests/site.pp
我有这个:
Exec {
path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
}
用户是root
。知道可能是什么问题吗?好像$PATH
是空的。。。
您将 zookeeper_untar exec 中的路径设置为伪造的。不要那样做,它会再次起作用:)