Skip to content
This repository has been archived by the owner on Feb 19, 2024. It is now read-only.

Use puppetlabs-apt & require_packages() #18

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

poolski
Copy link

@poolski poolski commented Jan 4, 2016

Refactored:

  • using ensure_packages( ... ) in place of package{ ... } type to avoid collisions with other modules using apt-transport-https
  • using puppetlabs-apt module to manage Apt repo keys in place of running the apt-key command on each puppet run.

@poolski poolski changed the title Beta Use puppetlabs-apt & require_packages() Jan 4, 2016
ice799 and others added 8 commits February 18, 2016 13:20
Rework puppet code to support new GPG endpoints, version bump
Fixes lint fail when using examples, use single quotes for non variable strings
* Also changes elsif blocks for a case statement
Puppet-lint rule fixed: class included by relative name on line 31
@mcasper
Copy link

mcasper commented Apr 4, 2016

I would love for this to go in, as I'm currently experiencing Package collision problems with this module.
@poolski do you have the time to get this PR back up to date?

petems and others added 3 commits April 8, 2016 16:17
* Also adds coverage class
…defined_type

Refactor gem repo into defined type
Changes to use top scoped class include
@poolski
Copy link
Author

poolski commented Apr 12, 2016

@mcasper sure thing; give me a few minutes/hours/etc :)

@poolski
Copy link
Author

poolski commented Apr 12, 2016

@mcasper I think that's right - although might be worth checking that I haven't wrecked anything you've done.

@mcasper
Copy link

mcasper commented Apr 12, 2016

Looks good to me! :)

Copy link

@mterzo mterzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update pygpgme to use ensure_packages.

package { 'apt-transport-https':
ensure => latest,
}
ensure_packages('apt-transport-https')
Copy link

@mterzo mterzo Sep 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took keep the same functionality, should it not be "{ ensure => 'latest' }"

This should also be converted to ensure_packages:

       'OEL': {
         package { 'pygpgme':
           ensure => latest,
         }

Copy link

@stevenrombauts stevenrombauts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working for me too, after applying these two little fixes!

path => "/etc/apt/sources.list.d/${normalized_name}.list",
mode => '0644',
content => template('packagecloud/apt.erb'),
} elsif $type == 'deb' {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should be changed back to 'deb': { because we're in case statement here, not an if/else block. :)

$repo_url = "${base_url}/${repo_name}/${osname}"
$distribution = $::lsbdistcodename

file { $normalized_name:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The require => File[$normalized_name] line should now also be removed from Exec["apt_key_add_${normalized_name}"] a bit further down, since File[$normalized_name] has now been replaced with an apt::source resource.

@tarjei
Copy link

tarjei commented Jan 18, 2017

Hi, any news on when this will be merged?

repos => "${component}",
key => {
'id' => '418A7F2FB0E1E6E7EABF6FE8C2E73424D59097AB',
'server' => 'pgp.mit.edu'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, we can't use pgp.mit.edu. We used to use this in the past, but it goes down very, very often and it breaks most of our user's CI/CD/deploys when that happens.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants