2021-11-03 03:31:31 +00:00
|
|
|
KEY='https://repositories.timber.io/public/vector/gpg.3543DB2D0A2BC4B8.key'
|
2020-10-31 07:51:38 +00:00
|
|
|
|
2021-11-03 03:31:31 +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
|
|
|
|
2021-11-03 03:31:31 +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
|
|
|
|
2021-11-03 03:31:31 +00:00
|
|
|
# Retrieve the Ubuntu code:
|
|
|
|
DIST = run_command('lsb_release -cs').stdout.chomp
|
2020-10-31 07:51:38 +00:00
|
|
|
|
2021-11-03 03:31:31 +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
|
|
|
|
|
2022-08-11 03:21:34 +00:00
|
|
|
execute 'apt update' do
|
|
|
|
not_if 'which vector'
|
|
|
|
end
|
2020-10-31 07:51:38 +00:00
|
|
|
|
2021-11-03 03:31:31 +00:00
|
|
|
package 'vector'
|