簡體   English   中英

使用wget提取和提取.zip文件的流浪木偶

[英]Vagrant Puppet using wget to fetch and extract .zip file

嗨,我正在創建一個Vagrant安裝程序,我需要提取一個.zip文件,該文件將放在/ vagrant / www目錄中。

我嘗試這樣做的方式是:

 exec { 'setup octobercms':
    command => "/bin/sh -c 'wget -P /vagrant/www https://github.com/octobercms/install/archive/master.zip'",
    timeout => 900,
    logoutput => true
}

觸發流浪漢后,我可以看到文件正在下載,但沒有出現在/ vagrant / www目錄中。 該文件與vagrant無關,但將用於安裝October CMS。

使用p時,提取壓縮文件並將其內容提取到目錄中並刪除壓縮檔案的最佳方法是什么?

任何幫助將非常感激。

exec命令在外殼的通用構造中運行,並且沒有遵循引起它的用戶帳戶的約束。 嘗試:

exec { 'setup octobercms':
    command => "cd /vagrant/www/; /bin/sh -c 'wget https://github.com/octobercms/install/archive/master.zip'",
    timeout => 900,
    logoutput => true
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM