1
我有一個文件在一些網址(http://www.somewhere.com/something.tar.gz)。 這是直接下載鏈接。 我需要一個木偶代碼來下載這個文件,解壓縮並安裝文件。傀儡代碼下載提取和安裝
我們可以在傀儡中使用package {}
嗎?
我有一個文件在一些網址(http://www.somewhere.com/something.tar.gz)。 這是直接下載鏈接。 我需要一個木偶代碼來下載這個文件,解壓縮並安裝文件。傀儡代碼下載提取和安裝
我們可以在傀儡中使用package {}
嗎?
對於瞭解tarballs的軟件包類型,並沒有真正的內在提供者。然而,這是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,
}
在init.pp我不得不'包括:: archive'? –
是的,或者聲明班級。你的選擇。 –