¿Cuál es la forma idiomática de instalar un paquete Debian usando Chef?
Debajo de mi código para instalar vcider. Estoy aprendiendo chef pero no he visto nada para instalar un dpkg. Me gustaría usar la versión en el script. El siguiente código funciona.
script "install_vcider" do
interpreter "bash"
user "root"
cwd "/tmp"
code <<-EOH
wget https://my.vcider.com/m/downloads/vcider_2.0.1b_amd64.deb
dpkg -i vcider__amd64.deb
EOH
end
Incluso con el código anterior, ¿puedo reemplazar 2.0.1 b con #{version}? attribute file - > default [: vcider] [: version] 2.0.1 b
recipe file - > version = node[:vcider][:version]
23
Author: Jordan Dea-Mattson, 2012-03-28
1 answers
Lo correcto es usar los tipos de recursos integrados. Suponiendo que haya establecido las variables version
y arch
apropiadamente:
remote_file "/tmp/vcider_#{version}_#{arch}.deb" do
source "https://my.vcider.com/m/downloads/vcider_#{version}_#{arch}.deb"
mode 0644
checksum "" # PUT THE SHA256 CHECKSUM HERE
end
dpkg_package "vcider" do
source "/tmp/vcider_#{version}_#{arch}.deb"
action :install
end
42
Author: Charles Duffy,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-03-28 12:40:38
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-03-28 12:40:38