Currently I'm attempting to update my Vagrant machine with Puppet modules to PHP7, and ofcourse, with updated modules. However since updating the puppetlabs/apache module to version 3.0.0, it is failing when it's trying to install libapache2-mod-php7.0
.
I've already been able to track it down to the cause. For some reason, the puppetlabs/apache module is setting two MPM's when the ::apache::mod::php
class is being called. It sets both the event as the prefork MPM. The reason prefork is being set, is because the Puppet module requires you to either load the prefork or itk module when using PHP. When I define either prefork or itk, it also loads the event MPM for some reason. As of now, this is how I call the apache module:
class { '::apache':
default_vhost => false,
mpm_module => 'false',
server_signature => 'Off',
}
class { '::apache::mod::ssl': }
class { '::apache::mod::prefork': }
class { '::apache::mod::php': }
class { '::apache::mod::rewrite': }
class { '::apache::mod::headers': }
When I set mpm_module to anything other than itk or prefork, it generates the error itk or prefork is mandatory. When I remove ::apache::mod::prefork
and set the mpm_module setting to prefork, the same happens as with the current config.
When I ssh in to the Vagrant machine after the installation failed, and remove the LoadModule line in the /etc/apache2/modules-enabled/event.load
file, everything works as expected. I have no idea why it is loading the event MPM, as the double MPM load is causing the conflict. Apache has no idea which MPM to load, thus fails on installation of the libapache2-mod-php7.0 installation.
There is also no output of Puppet that shows the event.conf/event.load files are created, only the prefork ones.
Notice: /Stage[main]/Apache::Mod::Prefork/Apache::Mpm[prefork]/File[/etc/apache2/mods-available/prefork.load]/ensure: defined content as '{md5}01b33d643f63126888cf702689f1f66d'
Notice: /Stage[main]/Apache::Mod::Prefork/Apache::Mpm[prefork]/File[/etc/apache2/mods-enabled/prefork.conf]/ensure: created
Notice: /Stage[main]/Apache::Mod::Prefork/Apache::Mpm[prefork]/File[/etc/apache2/mods-enabled/prefork.load]/ensure: created
I'm running it on Debian Stretch x64, with the latest stable release of Vagrant, VirtualBox, Puppet and Apache/2.4.25.