傀儡执行中的问题

我想用puppet运行下面的命令:

sb2-init rasp /home/ubuntu/raspberry_pi_development/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc 

在木偶:

 exec { "initSB2": command => "sb2-init rasp /home/ubuntu/raspberry_pi_development/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc" , cwd => "/home/vagrant/raspberry_pi_development/rootfs", path => "/home/vagrant/raspberry_pi_development/scratchbox2/bin", user => 'vagrant', logoutput => true, } 

sb2-init命令在“/ home / vagrant / raspberry_pi_development / scratchbox2 / bin”目录下,我想在“/ home / vagrant / raspberry_pi_development / scratchbox2 / bin”文件夹中执行这个命令。

当我执行这个傀儡 – 清单我得到:

  notice: /Stage[main]//Exec[initSB2]/returns: /home/vagrant/raspberry_pi_development/scratchbox2/bin/sb2-init: line 6 sename: command not found notice: /Stage[main]//Exec[initSB2]/returns: /home/vagrant/raspberry_pi_development/scratchbox2/bin/sb2-init: line 6 sename: command not found notice: /Stage[main]//Exec[initSB2]/returns: /home/vagrant/raspberry_pi_development/scratchbox2/bin/sb2-init: line 8 sename: command not found notice: /Stage[main]//Exec[initSB2]/returns: /home/vagrant/raspberry_pi_development/scratchbox2/bin/sb2-init: line 8 =: unary operator expected notice: /Stage[main]//Exec[initSB2]/returns: /home/vagrant/raspberry_pi_development/scratchbox2/bin/sb2-init: line 2 readlink: command not found notice: /Stage[main]//Exec[initSB2]/returns: /home/vagrant/raspberry_pi_development/scratchbox2/bin/sb2-init: line 2 dirname: command not found notice: /Stage[main]//Exec[initSB2]/returns: /home/vagrant/raspberry_pi_development/scratchbox2/bin/sb2-init: line 2 readlink: command not found notice: /Stage[main]//Exec[initSB2]/returns: /home/vagrant/raspberry_pi_development/scratchbox2/bin/sb2-init: line 2 /share/scratchbox2/scripts/sb2-parse-sb2-init-args: No such file or directory notice: /Stage[main]//Exec[initSB2]/returns: Error: no target given err: /Stage[main]//Exec[initSB2]/returns: change from notrun to 0 failed: /bin/sh -c "sb2-init rasp /home/ubuntu/ras ry_pi_development/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc" returned 1 ead of one of [0] at /tmp/vagrant-puppet-1/manifests/devbox.pp:332 

这个命令的工作原理,当我手动在shell中键入而不是与puppet!

问题是什么?

问候迈克尔

我不认为这实际上与Puppet有什么关系 – 命令输出实际上来自脚本,而不是Puppet(从外观来看,缺less包和脚本语法都存在问题,但没有看到脚本,这是不可能的)。

我会手动运行命令(例如通过SSH)并检查输出。 一旦你已经解决了潜在的问题,重新运行Puppet命令,一切都应该成功。