Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrongly named parameters for apt::source/key #420

Merged
merged 2 commits into from
Mar 3, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions manifests/repo/debian.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
# [*dotdeb*]
# Enable special dotdeb handling
#
# [*sury*]
# Enable special sury handling
#
class php::repo::debian(
$location = 'http://packages.dotdeb.org',
$release = 'wheezy-php56',
Expand All @@ -30,6 +33,7 @@
'source' => 'http://www.dotdeb.org/dotdeb.gpg',
},
$dotdeb = true,
$sury = true,
) {

if $caller_module_name != $module_name {
Expand Down Expand Up @@ -70,22 +74,25 @@
}
}

if ($php::globals::php_version == '7.1') {
if ($sury and $php::globals::php_version == '7.1') {
# Required packages for PHP 7.1 repository
ensure_packages(['lsb-release', 'ca-certificates'], {'ensure' => 'present'})

# Add PHP 7.1 key + repository
apt::key { 'php::repo::debian-php71':
key => 'DF3D585DB8F0EB658690A554AC0E47584A7A714D',
key_source => 'https://packages.sury.org/php/apt.gpg',
id => 'DF3D585DB8F0EB658690A554AC0E47584A7A714D',
source => 'https://packages.sury.org/php/apt.gpg',
}

::apt::source { 'source_php_71':
location => 'https://packages.sury.org/php/',
release => $::lsbdistcodename,
repos => 'main',
include_src => false,
require => [
location => 'https://packages.sury.org/php/',
release => $::lsbdistcodename,
Copy link
Member

Choose a reason for hiding this comment

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

preferred way would be to use the new facts hash instead of a topscope variable. If you want you can change this in another PR, or we just stick with it.

repos => 'main',
include => {
'src' => $include_src,
'deb' => true,
},
require => [
Apt::Key['php::repo::debian-php71'],
Package['apt-transport-https', 'lsb-release', 'ca-certificates']
],
Expand Down