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

Use puppetlabs-apt & require_packages()#18

Open
poolski wants to merge 20 commits into
computology:masterfrom
poolski:beta
Open

Use puppetlabs-apt & require_packages()#18
poolski wants to merge 20 commits into
computology:masterfrom
poolski:beta

Conversation

@poolski

@poolski poolski commented Jan 4, 2016

Copy link
Copy Markdown

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

mcasper commented Apr 4, 2016

Copy link
Copy Markdown

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

poolski commented Apr 12, 2016

Copy link
Copy Markdown
Author

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

@poolski

poolski commented Apr 12, 2016

Copy link
Copy Markdown
Author

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

@mcasper

mcasper commented Apr 12, 2016

Copy link
Copy Markdown

Looks good to me! :)

@mterzo mterzo left a comment

Copy link
Copy Markdown

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.

Comment thread manifests/init.pp
package { 'apt-transport-https':
ensure => latest,
}
ensure_packages('apt-transport-https')

@mterzo mterzo Sep 20, 2016

Copy link
Copy Markdown

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,
         }

@stevenrombauts stevenrombauts left a comment

Copy link
Copy Markdown

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!

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

Copy link
Copy Markdown

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. :)

Comment thread manifests/repo.pp Outdated
$repo_url = "${base_url}/${repo_name}/${osname}"
$distribution = $::lsbdistcodename

file { $normalized_name:

Copy link
Copy Markdown

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

tarjei commented Jan 18, 2017

Copy link
Copy Markdown

Hi, any news on when this will be merged?

Comment thread manifests/repo.pp
repos => "${component}",
key => {
'id' => '418A7F2FB0E1E6E7EABF6FE8C2E73424D59097AB',
'server' => 'pgp.mit.edu'

Copy link
Copy Markdown
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