comparison 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
comparison
equal deleted inserted replaced
477:21f6add30502 478:adf6fe9bbc17
2 # 2 #
3 # === Parameters 3 # === Parameters
4 # 4 #
5 # [*location*] 5 # [*location*]
6 # Location of the apt repository 6 # Location of the apt repository
7 #
8 # [*release*]
9 # Release of the apt repository
10 # 7 #
11 # [*repos*] 8 # [*repos*]
12 # Apt repository names 9 # Apt repository names
13 # 10 #
14 # [*include_src*] 11 # [*include_src*]
23 # [*sury*] 20 # [*sury*]
24 # Enable special sury handling 21 # Enable special sury handling
25 # 22 #
26 class php::repo::debian ( 23 class php::repo::debian (
27 String[1] $location = 'https://packages.dotdeb.org', 24 String[1] $location = 'https://packages.dotdeb.org',
28 String[1] $release = 'wheezy-php56',
29 String[1] $repos = 'all', 25 String[1] $repos = 'all',
30 Boolean $include_src = false, 26 Boolean $include_src = false,
31 Hash $key = { 27 Hash $key = {
32 'id' => '6572BBEF1B5FF28B28B706837E3F070089DF5277', 28 'id' => '6572BBEF1B5FF28B28B706837E3F070089DF5277',
33 'source' => 'http://www.dotdeb.org/dotdeb.gpg', 29 'source' => 'http://www.dotdeb.org/dotdeb.gpg',
35 Boolean $dotdeb = true, 31 Boolean $dotdeb = true,
36 Boolean $sury = true, 32 Boolean $sury = true,
37 ) { 33 ) {
38 assert_private() 34 assert_private()
39 35
36 if $facts['os']['name'] != 'Debian' {
37 fail("class php::repo::debian does not work on OS ${facts['os']['name']}")
38 }
40 include 'apt' 39 include 'apt'
41 40
42 apt::source { "source_php_${release}": 41 if ($dotdeb and versioncmp($facts['os']['release']['major'], '9') < 1) {
43 location => $location, 42 apt::source { 'source_php_dotdeb':
44 release => $release, 43 location => $location,
45 repos => $repos, 44 repos => $repos,
46 include => { 45 include => {
47 'src' => $include_src, 46 'src' => $include_src,
48 'deb' => true, 47 'deb' => true,
49 }, 48 },
50 key => $key, 49 key => $key,
50 }
51 } 51 }
52 52
53 if ($sury and $php::globals::php_version in ['7.1','7.2']) { 53 if ($sury and versioncmp($facts['os']['release']['major'], '9') >= 0) {
54 apt::source { 'source_php_sury': 54 apt::source { 'source_php_sury':
55 location => 'https://packages.sury.org/php/', 55 location => 'https://packages.sury.org/php/',
56 repos => 'main', 56 repos => 'main',
57 include => { 57 include => {
58 'src' => $include_src, 58 'src' => $include_src,