I'm pretty new to Puppet. So, I'm here asking for help on how the best way to fix my problem.
I'm using this puppet module to provision PHP into my Ubuntu 13.10 box. But, it seems that package php5-mcrypt
is broken since, mcrypt.ini
is misplaced at /etc/php5/conf.d
instead of /etc/php5/apache2/available-modules/
(For the record, I'm working with Apache 2.4 and PHP 5.5)
I've made a class php-mcrypt
that 'works for me'. But, I want to know if there's a better/cleaner way to do it.
Here's my workaround:
# https://github.com/lucasvscn/puppet-php-mcrypt
#
class php-mcrypt() {
Exec { path => [ "/bin/", "/sbin/" , "/usr/bin/", "/usr/sbin/" ] }
package { "php5-mcrypt":
ensure => "installed",
require => Class['php'],
}
file { '/etc/php5/conf.d/mcrypt.ini':
require => Package['php5-mcrypt'],
}
exec {
"copying_mcrypt":
command => 'cp -v /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available/',
require => Package['php5-mcrypt'],
}->
exec {
"enabling_mcrypt":
command => 'php5enmod mcrypt && service apache2 reload',
require => Package['php5-mcrypt'],
}
}