我在某个网址(http://www.somewhere.com/something.tar.gz)上有一个文件.这是直接下载链接.我需要一个下载此文件,解压缩并安装文件的木偶代码.
我们可以package {}在傀儡中使用吗?
对于理解tarball的包类型,没有真正的内在提供者.但是,这个VoxPopuli模块:https://forge.puppet.com/puppet/archive 最近获得了Puppet认证,应该可以满足您的需求.
请注意,根据其使用示例,可以根据您的需要进行修改,例如:
archive { '/tmp/something':
ensure => present,
extract => true,
extract_path => '/tmp',
source => 'http://www.somewhere.com/something.tar.gz',
checksum => 'checksum hash',
checksum_type => 'sha1',
creates => '/tmp/something',
cleanup => true,
}
Run Code Online (Sandbox Code Playgroud)