Mercurial > repos > other > Puppet
annotate modules/php/manifests/embedded.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 | 3fce34f642f1 |
children |
rev | line source |
---|---|
386
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
1 # Install and configure php embedded SAPI |
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 # [*inifile*] |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
6 # The path to the ini php5-embeded ini file |
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 # [*settings*] |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
9 # Hash with nested hash of key => value to set in inifile |
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 # [*package*] |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
12 # Specify which package to install |
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 # [*ensure*] |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
15 # Specify which version of the package to install |
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 class php::embedded ( |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
18 String $ensure = $php::ensure, |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
19 String $package = "${php::package_prefix}${php::params::embedded_package_suffix}", |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
20 Stdlib::Absolutepath $inifile = $php::params::embedded_inifile, |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
21 Hash $settings = {}, |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
22 ) inherits php::params { |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
23 assert_private() |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
24 |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
25 $real_settings = lookup( |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
26 'php::embedded::settings', |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
27 Hash, { |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
28 'strategy' => 'deep', |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
29 'merge_hash_arrays' => true |
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 $settings |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
32 ) |
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 $real_package = $facts['os']['family'] ? { |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
35 'Debian' => "lib${package}", |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
36 default => $package, |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
37 } |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
38 |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
39 package { $real_package: |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
40 ensure => $ensure, |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
41 require => Class['php::packages'], |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
42 } |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
43 -> php::config { 'embedded': |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
44 file => $inifile, |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
45 config => $real_settings, |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
46 } |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
47 } |