About | FAQ | Help
Ask Your Question
0

Convert `apt-key add` with gpg for use with `apt` module

asked 2018-05-14 15:29:38 -0500

tylerecouture gravatar image

I have some install instructions from Play on Linux:

wget -q "http://deb.playonlinux.com/public.gpg" -O- | sudo apt-key add -
sudo wget http://deb.playonlinux.com/playonlinux_trusty.list -O /etc/apt/sources.list.d/playonlinux.list
sudo apt-get update
sudo apt-get install playonlinux

Which I'm trying to install using puppet's apt module:

  include apt

  apt::source { 'play_on_linux_repo':
    location => 'http://deb.playonlinux.com/',
    repos    => 'main',
    key      => {
      'id'     => 'http://deb.playonlinux.com/public.gpg',
      'server' => 'subkeys.pgp.net',
    },
  }

  package { 'playonlinux':
    ensure => latest,
  }

Where do I get the proper key (fingerprint?) to provide for this? The gpg link for id results in an error.

edit retag flag offensive close merge delete

Comments

Are you seriously asking how to use GPG?

Kai Burghardt gravatar imageKai Burghardt ( 2018-05-14 16:52:50 -0500 )edit

Is this forbidden or something?

tylerecouture gravatar imagetylerecouture ( 2018-05-14 17:20:31 -0500 )edit

It's kind of an odd question to ask on a Puppet Q'n'A site, isn't it.

Kai Burghardt gravatar imageKai Burghardt ( 2018-05-15 05:18:42 -0500 )edit

I have no idea... I'm just a hack trying to learn puppet. Should I move this somewhere else?

tylerecouture gravatar imagetylerecouture ( 2018-05-15 08:16:00 -0500 )edit

No worries, mate. I covered you, see?

Kai Burghardt gravatar imageKai Burghardt ( 2018-05-15 09:23:31 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2018-05-15 05:22:05 -0500

On a machine where you have already followed the install instructions, you can do

$ apt-key finger Play

Where “Play” is a part of the key's display name.

The fingerprint is then copied to the id attribute (without spacing), and instead of a server attribute you specify source with the full URI of the key.

edit flag offensive delete link more

Comments

Btw, your Package[playonlinux] should require => Apt::Source['play_on_linux_repo']. Both resources are apparently in the same stage.

Kai Burghardt gravatar imageKai Burghardt ( 2018-05-15 06:59:39 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-05-14 15:29:38 -0500

Seen: 27 times

Last updated: May 15