aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-07-05 15:30:07 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-07-05 15:30:07 -0300
commit0e9182000aadddbd5ef5a3b4fdc0a5ee5228f35f (patch)
tree2c1b171d488fd7e24febb9b10422d996b22e5f5c /manifests
parent66468a58e5250aa64fd08e63c738c4c8b54eab41 (diff)
downloadpuppet-php-0e9182000aadddbd5ef5a3b4fdc0a5ee5228f35f.tar.gz
puppet-php-0e9182000aadddbd5ef5a3b4fdc0a5ee5228f35f.tar.bz2
Adds php::folder param
Diffstat (limited to 'manifests')
-rw-r--r--manifests/config.pp2
-rw-r--r--manifests/init.pp15
2 files changed, 11 insertions, 6 deletions
diff --git a/manifests/config.pp b/manifests/config.pp
index b09a68b..22ae8a8 100644
--- a/manifests/config.pp
+++ b/manifests/config.pp
@@ -1,5 +1,5 @@
define php::config($key, $value, $ensure = 'present', $sapi = '') {
- file { "/etc/php5/${sapi}/conf.d/${name}.ini":
+ file { "${::php::folder}/${sapi}/conf.d/${name}.ini":
ensure => $ensure,
owner => root,
group => root,
diff --git a/manifests/init.pp b/manifests/init.pp
index 7892265..034801f 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -26,14 +26,19 @@ class php {
}
}
- file { [ '/etc/php5', '/etc/php5/cli', '/etc/php5/apache2' ]:
+ $folder = ? $::lsbdistcodename {
+ 'xenial' => '/etc/php',
+ default => '/etc/php5',
+ },
+
+ file { [ "${folder}", "${folder}/cli", "${folder}/apache2" ]:
ensure => directory,
owner => root,
group => root,
mode => 0755,
}
- file { '/etc/php5/cli/php.ini':
+ file { "${folder}/cli/php.ini":
ensure => present,
owner => root,
group => root,
@@ -43,10 +48,10 @@ class php {
"puppet:///modules/php/cli/php.${::operatingsystem}_${::lsbdistcodename}.ini",
"puppet:///modules/php/cli/php.${::operatingsystem}.ini",
"puppet:///modules/php/cli/php.ini" ],
- require => [ Package['php5'], File['/etc/php5/cli'] ],
+ require => [ Package['php5'], File["${folder}/cli"] ],
}
- file { "/etc/php5/apache2/php.ini":
+ file { "${folder}/apache2/php.ini":
ensure => present,
owner => root,
group => root,
@@ -57,6 +62,6 @@ class php {
"puppet:///modules/php/apache2/php.${::operatingsystem}.ini",
"puppet:///modules/php/apache2/php.ini" ],
notify => Service['apache2'],
- require => [ Package['php5'], File['/etc/php5/apache2'] ],
+ require => [ Package['php5'], File["${folder}/etc/php5/apache2'] ],
}
}