Mercurial > repos > other > Puppet
annotate modules/php/manifests/repo/debian.pp @ 482:d83de9b3a62b default tip
Update hiera.yaml within Puppet config
Forgot that we manage it from here. Now has content to match
new packages
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Fri, 30 Aug 2024 16:10:36 +0100 |
parents | adf6fe9bbc17 |
children |
rev | line source |
---|---|
386
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
1 # Configure debian apt repo |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
2 # |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
3 # === Parameters |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
4 # |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
5 # [*location*] |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
6 # Location of the apt repository |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
7 # |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
8 # [*repos*] |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
9 # Apt repository names |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
10 # |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
11 # [*include_src*] |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
12 # Add source source repository |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
13 # |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
14 # [*key*] |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
15 # Public key in apt::key format |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
16 # |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
17 # [*dotdeb*] |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
18 # Enable special dotdeb handling |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
19 # |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
20 # [*sury*] |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
21 # Enable special sury handling |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
22 # |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
23 class php::repo::debian ( |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
24 String[1] $location = 'https://packages.dotdeb.org', |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
25 String[1] $repos = 'all', |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
26 Boolean $include_src = false, |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
27 Hash $key = { |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
28 'id' => '6572BBEF1B5FF28B28B706837E3F070089DF5277', |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
29 'source' => 'http://www.dotdeb.org/dotdeb.gpg', |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
30 }, |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
31 Boolean $dotdeb = true, |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
32 Boolean $sury = true, |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
33 ) { |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
34 assert_private() |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
35 |
478
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
386
diff
changeset
|
36 if $facts['os']['name'] != 'Debian' { |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
386
diff
changeset
|
37 fail("class php::repo::debian does not work on OS ${facts['os']['name']}") |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
386
diff
changeset
|
38 } |
386
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
39 include 'apt' |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
40 |
478
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
386
diff
changeset
|
41 if ($dotdeb and versioncmp($facts['os']['release']['major'], '9') < 1) { |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
386
diff
changeset
|
42 apt::source { 'source_php_dotdeb': |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
386
diff
changeset
|
43 location => $location, |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
386
diff
changeset
|
44 repos => $repos, |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
386
diff
changeset
|
45 include => { |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
386
diff
changeset
|
46 'src' => $include_src, |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
386
diff
changeset
|
47 'deb' => true, |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
386
diff
changeset
|
48 }, |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
386
diff
changeset
|
49 key => $key, |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
386
diff
changeset
|
50 } |
386
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
51 } |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
52 |
478
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
386
diff
changeset
|
53 if ($sury and versioncmp($facts['os']['release']['major'], '9') >= 0) { |
386
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
54 apt::source { 'source_php_sury': |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
55 location => 'https://packages.sury.org/php/', |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
56 repos => 'main', |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
57 include => { |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
58 'src' => $include_src, |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
59 'deb' => true, |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
60 }, |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
61 key => { |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
62 id => '15058500A0235D97F5D10063B188E2B695BD4743', |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
63 source => 'https://packages.sury.org/php/apt.gpg', |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
64 }, |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
65 } |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
66 } |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
67 } |