Mercurial > repos > other > Puppet
diff modules/php/manifests/repo/debian.pp @ 478:adf6fe9bbc17
Update Puppet modules to latest versions
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Thu, 29 Aug 2024 18:47:29 +0100 |
parents | 3fce34f642f1 |
children |
line wrap: on
line diff
--- a/modules/php/manifests/repo/debian.pp Tue Aug 27 13:35:17 2024 +0100 +++ b/modules/php/manifests/repo/debian.pp Thu Aug 29 18:47:29 2024 +0100 @@ -5,9 +5,6 @@ # [*location*] # Location of the apt repository # -# [*release*] -# Release of the apt repository -# # [*repos*] # Apt repository names # @@ -25,7 +22,6 @@ # class php::repo::debian ( String[1] $location = 'https://packages.dotdeb.org', - String[1] $release = 'wheezy-php56', String[1] $repos = 'all', Boolean $include_src = false, Hash $key = { @@ -37,20 +33,24 @@ ) { assert_private() + if $facts['os']['name'] != 'Debian' { + fail("class php::repo::debian does not work on OS ${facts['os']['name']}") + } include 'apt' - apt::source { "source_php_${release}": - location => $location, - release => $release, - repos => $repos, - include => { - 'src' => $include_src, - 'deb' => true, - }, - key => $key, + if ($dotdeb and versioncmp($facts['os']['release']['major'], '9') < 1) { + apt::source { 'source_php_dotdeb': + location => $location, + repos => $repos, + include => { + 'src' => $include_src, + 'deb' => true, + }, + key => $key, + } } - if ($sury and $php::globals::php_version in ['7.1','7.2']) { + if ($sury and versioncmp($facts['os']['release']['major'], '9') >= 0) { apt::source { 'source_php_sury': location => 'https://packages.sury.org/php/', repos => 'main',