Puppet:exec []:wget返回8而不是0

时间:2017-07-08 14:38:22

标签: puppet puppet-enterprise

我对Puppet完全不熟悉,这是我第一次在puppet中编写代码。我想获得一个tar.gz文件,然后解压缩它来创建文件夹。

这是我的代码:

file{ "${::filename}.tar.gz":
   ensure => 'file',
   mode   => '0644',
   notify => Exec['untar-file'],
}

exec{ 'download-file' :
   command => "wget URL_FOR_TAR_GZ",
   cwd     => "PATH_WHERE_TO_STORE",
   user    => "my_name",
   group   => "our company name",
}

exec { 'untar-file':
   command => "/bin/tar -xzvf tar_file_name",
   cwd     => "file_path",
   creates => "foldername_to_be_createdc",
   user    => "my_name",
   group   => "our company name",
   require => Exec['download-file']
}

一旦我运行这个,我就会收到一个错误:

  

wget返回8而不是[0]"和" / Exec [download-file] /返回:从notrun更改为0失败"

我哪里错了?

0 个答案:

没有答案