annotate modules/php/manifests/params.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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
386
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 # PHP params class
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 class php::params inherits php::globals {
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4 $ensure = 'present'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 $fpm_service_enable = true
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 $fpm_service_ensure = 'running'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 $composer_source = 'https://getcomposer.org/composer.phar'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8 $composer_path = '/usr/local/bin/composer'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9 $composer_max_age = 30
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 $pear_ensure = 'present'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 $pear_package_suffix = 'pear'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
12 $phpunit_source = 'https://phar.phpunit.de/phpunit.phar'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
13 $phpunit_path = '/usr/local/bin/phpunit'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
14 $phpunit_max_age = 30
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
15 $pool_purge = false
478
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
16 $fpm_log_dir_mode = '0770'
386
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
17
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
18 $fpm_pools = {
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
19 'www' => {
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
20 'catch_workers_output' => 'no',
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
21 'listen' => '127.0.0.1:9000',
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
22 'listen_backlog' => -1,
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
23 'pm' => 'dynamic',
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
24 'pm_max_children' => 50,
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
25 'pm_max_requests' => 0,
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
26 'pm_max_spare_servers' => 35,
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
27 'pm_min_spare_servers' => 5,
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
28 'pm_start_servers' => 5,
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
29 'request_terminate_timeout' => 0,
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 }
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 case $facts['os']['family'] {
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
34 'Debian': {
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
35 $config_root = $php::globals::globals_config_root
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
36 $config_root_ini = "${config_root}/mods-available"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
37 $config_root_inifile = "${config_root}/php.ini"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
38 $common_package_names = []
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
39 $common_package_suffixes = ['cli', 'common']
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
40 $cli_inifile = "${config_root}/cli/php.ini"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
41 $dev_package_suffix = 'dev'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
42 $fpm_pid_file = $php::globals::globals_fpm_pid_file
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
43 $fpm_config_file = "${config_root}/fpm/php-fpm.conf"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
44 $fpm_error_log = $php::globals::fpm_error_log
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
45 $fpm_inifile = "${config_root}/fpm/php.ini"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
46 $fpm_package_suffix = 'fpm'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
47 $fpm_pool_dir = "${config_root}/fpm/pool.d"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
48 $fpm_service_name = $php::globals::fpm_service_name
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
49 $fpm_user = 'www-data'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
50 $fpm_group = 'www-data'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
51 $apache_inifile = "${config_root}/apache2/php.ini"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
52 $embedded_package_suffix = 'embed'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
53 $embedded_inifile = "${config_root}/embed/php.ini"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
54 $package_prefix = $php::globals::package_prefix
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
55 $compiler_packages = 'build-essential'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
56 $root_group = 'root'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
57 $ext_tool_enable = $php::globals::ext_tool_enable
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
58 $ext_tool_query = $php::globals::ext_tool_query
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
59 $ext_tool_enabled = true
478
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
60 $pear = true
386
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
61
478
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
62 case $php::globals::flavor {
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
63 'zend': {
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
64 $manage_repos = true
386
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 default: {
478
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
68 case $facts['os']['name'] {
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
69 'Debian': {
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
70 $manage_repos = false
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
71 }
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
72
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
73 'Ubuntu': {
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
74 $manage_repos = false
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
75 }
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
76
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
77 default: {
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
78 $manage_repos = false
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
79 }
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
80 }
386
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
81 }
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
82 }
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
83 }
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
84
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
85 'Suse': {
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
86 if ($php::globals::php_version != undef) {
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
87 $php_version_major = regsubst($php::globals::php_version, '^(\d+)\.(\d+)$','\1')
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
88 } else {
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
89 $php_version_major = 5
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
90 }
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
91
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
92 $config_root = $php::globals::globals_config_root
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
93 $config_root_ini = "${config_root}/conf.d"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
94 $config_root_inifile = "${config_root}/php.ini"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
95 $common_package_names = ["php${php_version_major}"]
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
96 $common_package_suffixes = []
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
97 $cli_inifile = "${config_root}/cli/php.ini"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
98 $dev_package_suffix = 'devel'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
99 $fpm_pid_file = $php::globals::globals_fpm_pid_file
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
100 $fpm_config_file = "${config_root}/fpm/php-fpm.conf"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
101 $fpm_error_log = $php::globals::fpm_error_log
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
102 $fpm_inifile = "${config_root}/fpm/php.ini"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
103 $fpm_package_suffix = 'fpm'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
104 $fpm_pool_dir = "${config_root}/fpm/pool.d"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
105 $fpm_service_name = 'php-fpm'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
106 $fpm_user = 'wwwrun'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
107 $fpm_group = 'www'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
108 $embedded_package_suffix = 'embed'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
109 $embedded_inifile = "${config_root}/embed/php.ini"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
110 $package_prefix = $php::globals::package_prefix
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
111 $manage_repos = true
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
112 $root_group = 'root'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
113 $ext_tool_enable = undef
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
114 $ext_tool_query = undef
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
115 $ext_tool_enabled = false
478
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
116 $pear = true
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
117
386
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
118 case $facts['os']['name'] {
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
119 'SLES': {
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
120 $compiler_packages = []
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
121 }
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
122 'OpenSuSE': {
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
123 $compiler_packages = 'devel_basis'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
124 }
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
125 default: {
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
126 fail("Unsupported operating system ${facts['os']['name']}")
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
127 }
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
128 }
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
129 }
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
130 'RedHat': {
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
131 $config_root = $php::globals::globals_config_root
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
132
478
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
133 case $php::globals::flavor {
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
134 'zend': {
386
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
135 $config_root_ini = "${config_root}/php.d"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
136 $config_root_inifile = "${config_root}/php.ini"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
137 $cli_inifile = $config_root_inifile
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
138 $fpm_inifile = $config_root_inifile
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
139 $fpm_config_file = "${config_root}/php-fpm.conf"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
140 $fpm_pool_dir = "${config_root}/php-fpm.d"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
141 }
478
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
142
386
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
143 default: {
478
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
144 case $php::globals::rhscl_mode {
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
145 'remi': {
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
146 $config_root_ini = "${config_root}/php.d"
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
147 $config_root_inifile = "${config_root}/php.ini"
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
148 $cli_inifile = $config_root_inifile
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
149 $fpm_inifile = $config_root_inifile
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
150 $fpm_config_file = "${config_root}/php-fpm.conf"
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
151 $fpm_pool_dir = "${config_root}/php-fpm.d"
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
152 $php_bin_dir = "${php::globals::rhscl_root}/bin"
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
153 }
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
154 'rhscl': {
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
155 $config_root_ini = "${config_root}/php.d"
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
156 $config_root_inifile = "${config_root}/php.ini"
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
157 $cli_inifile = "${config_root}/php-cli.ini"
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
158 $fpm_inifile = "${config_root}/php-fpm.ini"
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
159 $fpm_config_file = "${config_root}/php-fpm.conf"
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
160 $fpm_pool_dir = "${config_root}/php-fpm.d"
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
161 $php_bin_dir = "${php::globals::rhscl_root}/bin"
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
162 }
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
163 undef: {
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
164 # no rhscl
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
165 $config_root_ini = $config_root
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
166 $config_root_inifile = '/etc/php.ini'
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
167 $cli_inifile = '/etc/php-cli.ini'
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
168 $fpm_inifile = '/etc/php-fpm.ini'
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
169 $fpm_config_file = '/etc/php-fpm.conf'
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
170 $fpm_pool_dir = '/etc/php-fpm.d'
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
171 }
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
172 default: {
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
173 fail("Unsupported rhscl_mode '${php::globals::rhscl_mode}'")
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
174 }
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
175 }
386
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
176 }
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
177 }
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
178
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
179 $apache_inifile = $config_root_inifile
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
180 $embedded_inifile = $config_root_inifile
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
181 $common_package_names = []
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
182 $common_package_suffixes = ['cli', 'common']
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
183 $dev_package_suffix = 'devel'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
184 $fpm_pid_file = $php::globals::globals_fpm_pid_file
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
185 $fpm_error_log = '/var/log/php-fpm/error.log'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
186 $fpm_package_suffix = 'fpm'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
187 $fpm_service_name = pick($php::globals::fpm_service_name, 'php-fpm')
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
188 $fpm_user = 'apache'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
189 $fpm_group = 'apache'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
190 $embedded_package_suffix = 'embedded'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
191 $package_prefix = pick($php::globals::package_prefix, 'php-')
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
192 $compiler_packages = ['gcc', 'gcc-c++', 'make']
478
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
193 $manage_repos = $php::globals::flavor ? {
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
194 'zend' => true,
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
195 default => false,
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
196 }
386
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
197 $root_group = 'root'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
198 $ext_tool_enable = undef
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
199 $ext_tool_query = undef
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
200 $ext_tool_enabled = false
478
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
201 $pear = true
386
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
202 }
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
203 'FreeBSD': {
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
204 $config_root = $php::globals::globals_config_root
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
205 $config_root_ini = "${config_root}/php"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
206 $config_root_inifile = "${config_root}/php.ini"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
207 # No common packages, because the required PHP base package will be
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
208 # pulled in as a dependency. This preserves the ability to choose
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
209 # any available PHP version by setting the 'package_prefix' parameter.
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
210 $common_package_names = []
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
211 $common_package_suffixes = ['extensions']
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
212 $cli_inifile = "${config_root}/php-cli.ini"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
213 $dev_package_suffix = undef
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
214 $fpm_pid_file = $php::globals::globals_fpm_pid_file
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
215 $fpm_config_file = "${config_root}/php-fpm.conf"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
216 $fpm_error_log = '/var/log/php-fpm.log'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
217 $fpm_inifile = "${config_root}/php-fpm.ini"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
218 $fpm_package_suffix = undef
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
219 $fpm_pool_dir = "${config_root}/php-fpm.d"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
220 $fpm_service_name = 'php-fpm'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
221 $fpm_user = 'www'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
222 $fpm_group = 'www'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
223 $embedded_package_suffix = 'embed'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
224 $embedded_inifile = "${config_root}/php-embed.ini"
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
225 $package_prefix = $php::globals::package_prefix
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
226 $compiler_packages = ['gcc']
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
227 $manage_repos = false
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
228 $root_group = 'wheel'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
229 $ext_tool_enable = undef
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
230 $ext_tool_query = undef
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
231 $ext_tool_enabled = false
478
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
232 $pear = true
386
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
233 }
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
234 'Archlinux': {
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
235 $config_root_ini = '/etc/php/conf.d'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
236 $config_root_inifile = '/etc/php/php.ini'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
237 $common_package_names = []
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
238 $common_package_suffixes = []
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
239 $cli_inifile = '/etc/php/php.ini'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
240 $dev_package_suffix = undef
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
241 $fpm_pid_file = '/run/php-fpm/php-fpm.pid'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
242 $fpm_config_file = '/etc/php/php-fpm.conf'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
243 $fpm_error_log = 'syslog'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
244 $fpm_inifile = '/etc/php/php.ini'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
245 $fpm_package_suffix = 'fpm'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
246 $fpm_pool_dir = '/etc/php/php-fpm.d'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
247 $fpm_service_name = 'php-fpm'
478
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
248 $fpm_user = 'http'
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
249 $fpm_group = 'http'
386
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
250 $apache_inifile = '/etc/php/php.ini'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
251 $embedded_package_suffix = 'embedded'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
252 $embedded_inifile = '/etc/php/php.ini'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
253 $package_prefix = 'php-'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
254 $compiler_packages = ['gcc', 'make']
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
255 $manage_repos = false
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
256 $root_group = 'root'
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
257 $ext_tool_enable = undef
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
258 $ext_tool_query = undef
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
259 $ext_tool_enabled = false
478
adf6fe9bbc17 Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents: 386
diff changeset
260 $pear = false
386
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
261 }
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
262 default: {
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
263 fail("Unsupported osfamily: ${facts['os']['family']}")
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
264 }
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
265 }
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
266 }