我是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] / returns:从notrun更改为0失败”之一

我要去哪里错了?

  ask by translate from so

本文未有回复,本站智能推荐: