Problemas com Exec in Puppet

1

Eu quero executar o seguinte comando com fantoche:

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

Em fantoches:

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,
}

o comando sb2-init está no diretório "/ home / vagrant / raspberry_pi_development / scratchbox2 / bin" e eu quero executar este comando na pasta "/ home / vagrant / raspberry_pi_development / scratchbox2 / bin".

Quando eu executo este manifesto de marionete eu recebo:

    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

este comando funciona quando eu o digito manualmente no shell, mas não com o fantoche!

Qual é o problema?

Cumprimentos Michael

    
por Michael T 29.01.2014 / 17:37

1 resposta

0

Eu não acho que isso realmente tenha alguma coisa a ver com o Puppet - a saída do comando está realmente vindo do script, em vez de Puppet (aparentemente, há problemas com os pacotes ausentes e a sintaxe do script, mas sem ver o roteiro, é impossível dizer).

Eu manualmente executaria o comando (por exemplo, sobre SSH) e verificaria a saída. Depois de corrigir o problema subjacente, execute novamente o comando Puppet e tudo deve ser bem-sucedido.

    
por 28.02.2014 / 15:41