What is the idiomatic way to install a Debian package using Chef?
By : stin47
Date : March 29 2020, 07:55 AM
This might help you The Right Thing is to use the built-in resource types. Presuming you've set the version and arch variables appropriately: code :
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
|
How to make chef check for RPM package and then install?
By : Banktella Brasi
Date : March 29 2020, 07:55 AM
With these it helps I am currently using chef to install the RPM JDK package but the problem is that it does it every single time even if the package is already downloaded and installed. I tried finding an option for checking before installing but there wasn't any. Is there a way to get around this such that I can skip packages that are already installed? Debian's package management skips already installed packages by default, but RPM package manager doesn't seem to do that. , I know this is old, but I believe you want: code :
remote_file "your-remote-file" do
...
not_if "rpm -qa | grep -qx 'your-package'"
end
|
source for package to install via chef
By : Tankouille
Date : March 29 2020, 07:55 AM
Hope that helps Quoting the package documentation code :
remote_file '/usr/local/src/my_package.rpm' do
source 'http://any_internal_web_server/path/my_package.rpm'
end
package 'my_package.rpm' do
source '/usr/local/src/my_package.rpm'
end
|
Install apt package via Chef solo and Vagrant
By : Daniel Francis
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , If you are using the system cookbook from Supermarket, you need to include the system::install_packages recipe and set the node['system']['packages']['install'] attribute: code :
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = ["chef/site-cookbooks", "cookbooks"]
chef.add_recipe "build-essential"
chef.add_recipe "apt"
chef.add_recipe "system::install_packages"
chef.json = {
"system" => {
"packages" => {
"install" => ["libgmp3-dev"]
}
}
}
end
end
|
Chef: Install package in Centos 7
By : Febrianto Rachmat
Date : March 29 2020, 07:55 AM
I hope this helps you . I'd like to install net-tools on my centos/7 node. , Just use a package resource, like: code :
package 'net-tools' do
action :install
end
package 'net-tools'
case node['platform']
when 'centos'
package 'net-utils'
when 'other_os'
package 'other_package_name'
end
|