This repository was archived by the owner on Feb 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Use puppetlabs-apt & require_packages() #18
Open
poolski
wants to merge
20
commits into
computology:master
Choose a base branch
from
poolski:beta
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
f178d97
Refactoring how apt repos are managed
15a4aa6
refactored to use require_packages
662af90
Set correct keyserver
418bb01
Added apt requirement
7335828
Rework puppet code to support new GPG endpoints, version bump
ice799 a45ff25
Make it a major bump just incase
ice799 46ae3bc
Merge pull request #21 from computology/gpg_update
ice799 34d65c2
Fix quotes in names
petems 5885c5a
Merge pull request #22 from petems/patch-1
ice799 c084417
Refactors gem provider into separate defined type
petems 68ab5ac
Updates unit testing setup
petems e4b2f97
Changes to use top scoped class include
petems 79cc043
Adds spec for defined type
petems d67cd65
Merge pull request #23 from petems/refactor_gem_repo_into_defined_type
ice799 930f219
Merge pull request #24 from petems/fix_relative_include
ice799 3c61461
Refactoring how apt repos are managed
9bf9203
refactored to use require_packages
2e6081a
Set correct keyserver
72496f2
Added apt requirement
54b06a4
Merge branch 'beta' of github.com:poolski/computology-packagecloud in…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,20 +54,21 @@ | |
| repo_name => $repo_name, | ||
| } | ||
| } | ||
| 'deb': { | ||
| $osname = downcase($::operatingsystem) | ||
| case $osname { | ||
| 'debian', 'ubuntu': { | ||
|
|
||
| $component = 'main' | ||
| $repo_url = "${base_url}/${repo_name}/${osname}" | ||
| $distribution = $::lsbdistcodename | ||
|
|
||
| file { $normalized_name: | ||
| ensure => file, | ||
| path => "/etc/apt/sources.list.d/${normalized_name}.list", | ||
| mode => '0644', | ||
| content => template('packagecloud/apt.erb'), | ||
| } elsif $type == 'deb' { | ||
| $osname = downcase($::operatingsystem) | ||
| case $osname { | ||
| 'debian', 'ubuntu': { | ||
|
|
||
| $component = 'main' | ||
| $repo_url = "${base_url}/${repo_name}/${osname}" | ||
| $distribution = $::lsbdistcodename | ||
|
|
||
| apt::source {"${normalized_name}": | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
| location => "${repo_url}", | ||
| repos => "${component}", | ||
| key => { | ||
| 'id' => '418A7F2FB0E1E6E7EABF6FE8C2E73424D59097AB', | ||
| 'server' => 'pgp.mit.edu' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately, we can't use |
||
| } | ||
|
|
||
| exec { "apt_key_add_${normalized_name}": | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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 incasestatement here, not an if/else block. :)