我正在开始傀儡的第一步。 我正在设置ambari 。
这是我的木偶configuration:
exec { "ambari-repo": command => "curl http://public-repo-1.hortonworks.com/ambari/suse11/1.x/updates/1.4.4.23/ambari.repo > /etc/yum.repos.d/ambari.repo", path => ["/usr/bin", "/usr/sbin"] } package {"ambari-server": ensure => installed, require => Exec["ambari-repo"] } file { "hadoop-dir": path => "/hadoop", ensure => "directory" } exec { "ambari-server-setup": command => "ambari-server setup -s", path => ["/usr/bin", "/usr/sbin"], cwd => "/hadoop", user => "root", require => [Package["ambari-server"], File["hadoop-dir"]] }
但是当我的傀儡剧本跑了,它失败了:
Notice: Compiled catalog for localhost.be in environment production in 0.30 seconds Notice: /Stage[main]/Main/File[hadoop-dir]/ensure: created Notice: /Stage[main]/Main/Exec[ambari-repo]/returns: executed successfully Notice: /Stage[main]/Main/Package[ambari-server]/ensure: created Notice: Finished catalog run in 49.39 seconds Stderr from the command: Error: /usr/bin/env: bash: No such file or directory Error: /Stage[main]/Main/Exec[ambari-server-setup]/returns: change from notrun to 0 failed: /usr/bin/env: bash: No such file or directory
请注意,我与stream浪汉一起使用木偶。
任何想法我做错了什么?
谢谢
对于ambari-server-setup exec,你可以定义一个包含/ usr / bin和/ usr / sbin的path。
最有可能的是你的bash二进制文件安装为/ bin / bash,因此你还需要在这个path中包含/ bin。
我怀疑bash没有安装,或者它不在默认path。
当你login到木偶客户机时,输出是什么:
which bash