Ask Your Question

add key with puppetlabs-apt

asked 2014-01-16 14:08:03 -0600

Thynan gravatar image

updated 2014-01-17 02:20:03 -0600


I want to install varnish on ubuntu with this package: puppet module: .

But I don't want to use the standard ubuntu package. Instead I want to install the package provided from .

According to their website i have to do the following:

1. curl | sudo apt-key add -
2. echo "deb precise varnish-3.0" | sudo tee -a /etc/apt/sources.list
3. sudo apt-get update
4. sudo apt-get install varnish

But how do I do that with the puppetlabs/apt ... (more)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2014-01-17 04:47:54 -0600

Thynan gravatar image

Ok, I figured it out:

I added this (in hiera)

        release: %{::lsbdistcodename}
        repos: varnish-3.0

        key: C4DEFFEB

They "key:" attribute can really be anything, however, when i named it "varnish-3.0", the key was added every puppet run, because the unless of the apt::key execute didn't find the already added key. So I did an "apt-key list" and copied the name of the key (C4DEFEB). This is discussed here:!topic/puppet-users/jDeSFdNLeYA

edit flag offensive delete link more

answered 2014-01-16 16:54:03 -0600

lavaman gravatar image

The key parameter is simply the name of the key, which defaults to the title (in your case, varnish-3.0). You don't have to specify the key parameter at all. key_source is sufficient.

edit flag offensive delete link more


Ok, thanks! Do you also know how i can handle the second command? (echo "deb"?

Thynan gravatar imageThynan ( 2014-01-17 02:21:45 -0600 )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


Asked: 2014-01-16 14:08:03 -0600

Seen: 4,573 times

Last updated: Jan 17 '14