Search code examples
vectorpuppet

How to install vector using puppet


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?


Solution

  • You can add the key like this:

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