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

Rely more on puppetlabs-apt #494

Merged
merged 1 commit into from
Oct 31, 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
33 changes: 9 additions & 24 deletions manifests/repo/debian.pp
Original file line number Diff line number Diff line change
Expand Up @@ -38,29 +38,24 @@

assert_private()

include '::apt'
include 'apt'

create_resources(::apt::key, { 'php::repo::debian' => {
id => $key['id'],
source => $key['source'],
}})

::apt::source { "source_php_${release}":
apt::source { "source_php_${release}":
location => $location,
release => $release,
repos => $repos,
include => {
'src' => $include_src,
'deb' => true,
},
require => Apt::Key['php::repo::debian'],
key => $key,
}

if ($dotdeb) {
# both repositories are required to work correctly
# See: http://www.dotdeb.org/instructions/
if $release == 'wheezy-php56' {
::apt::source { 'dotdeb-wheezy':
apt::source { 'dotdeb-wheezy':
location => $location,
release => 'wheezy',
repos => $repos,
Expand All @@ -73,27 +68,17 @@
}

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':
id => 'DF3D585DB8F0EB658690A554AC0E47584A7A714D',
source => 'https://packages.sury.org/php/apt.gpg',
}

::apt::source { 'source_php_71':
apt::source { 'source_php_71':
location => 'https://packages.sury.org/php/',
release => $facts['os']['distro']['codename'],
repos => 'main',
include => {
'src' => $include_src,
'deb' => true,
},
require => [
Apt::Key['php::repo::debian-php71'],
Package['apt-transport-https', 'lsb-release', 'ca-certificates']
],
key => {
id => 'DF3D585DB8F0EB658690A554AC0E47584A7A714D',
source => 'https://packages.sury.org/php/apt.gpg',
},
}
}
}