itamae/cookbooks/nomad/install.rb

23 lines
481 B
Ruby
Raw Normal View History

2021-04-30 05:50:09 +00:00
# Install `Consul`:
KEYSRV = "https://apt.releases.hashicorp.com/gpg"
ID = "A3219F7B"
execute "apt-key adv --keyserver #{KEYSRV} --recv-keys #{ID}" do
not_if 'apt-key list | grep HashiCorp'
end
# Retrieve the Ubuntu code:
DIST = run_command('lsb_release -cs').stdout.chomp
# Deploy the `apt` sources:
template '/etc/apt/sources.list.d/hashicorp.list' do
action :create
variables(distribution: DIST)
end
execute 'apt update' do
not_if 'which nomad'
end
2021-04-30 05:50:09 +00:00
package 'nomad'