itamae/cookbooks/vector/install.rb

25 lines
547 B
Ruby
Raw Normal View History

KEY='https://repositories.timber.io/public/vector/gpg.3543DB2D0A2BC4B8.key'
2020-10-31 07:51:38 +00:00
execute "wget -O /tmp/vector.key #{KEY}" do
not_if 'apt-key list | grep "1E46 C153"'
end
2020-10-31 07:51:38 +00:00
execute 'apt-key add /tmp/vector.key' do
not_if 'apt-key list | grep "1E46 C153"'
end
2020-10-31 07:51:38 +00:00
# Retrieve the Ubuntu code:
DIST = run_command('lsb_release -cs').stdout.chomp
2020-10-31 07:51:38 +00:00
# Deploy the `apt` sources:
template '/etc/apt/sources.list.d/timber-vector.list' do
action :create
variables(distribution: DIST)
2020-10-31 07:51:38 +00:00
end
execute 'apt update' do
not_if 'which vector'
end
2020-10-31 07:51:38 +00:00
package 'vector'