itamae/cookbooks/vector/install.rb

18 lines
520 B
Ruby

%w("DATADOG_APT_KEY_CURRENT.public" "DATADOG_APT_KEY_C0962C7D.public" "DATADOG_APT_KEY_F14F620E.public").each do |key|
execute "wget -O /tmp/#{key} https://keys.datadoghq.com/#{key}"
execute "cat /tmp/#{key} | gpg --import --batch --no-default-keyring --keyring /usr/share/keyrings/datadog-archive-keyring.gpg"
end
# Deploy the `apt` sources:
remote_file '/etc/apt/sources.list.d/vector.list' do
owner 'root'
group 'root'
mode '0644'
end
execute 'apt update' do
not_if 'which vector'
end
package 'vector'