aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
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'] ],
}
}