How to install vector using puppet

Viewed 90

I'm trying to install vector (logging) using puppet but can't figure out how to specify the source and key for apt::source installation. Or where to get the source and key.

The vector install instructions for Ubuntu use an interactive script but I prefer not to run that using puppet exec.

The installation script includes these commands.

local gpg_keyring_path="/usr/share/keyrings/timber-vector-archive-keyring.gpg"
    curl -1sLf "https://repositories.timber.io/public/vector/gpg.3543DB2D0A2BC4B8.key" | gpg --dearmor > $gpg_keyring_path

How can I translate that into puppet?

2 Answers

You can add the key like this:

apt::key {'1E46C153E9EFA24018C36F753543DB2D0A2BC4B8':
   source => 'https://repositories.timber.io/public/vector/gpg.3543DB2D0A2BC4B8.key',  
   id     => '1E46C153E9EFA24018C36F753543DB2D0A2BC4B8'
}

possible solutions (some untested):

1 via official method

puppet module install vector

2 Follow from the github/repo guide

https://github.com/pulling-strings/puppet-vector

3 vector.dev's recommended method

curl --proto '=https' --tlsv1.2 -sSf https://sh.vector.dev | bash

4 if you have docker module in puppet

docker pull timberio/vector:0.24.1-debian
Related