Various documents on the Internet indicate that it is normal to use puppet to ensure that the Apache2 package is installed in Ubuntu eg
package { 'apache2':
ensure => present,
}
service { 'apache2':
ensure => running,
enable => true,
require => Package['apache2']
}
However, when testing this recently with Ubuntu Trusty, my agent is showing the following error:
Could not evaluate: Could not find init script or upstart conf file for 'apache2'
When I use the puppetlabs Apache module, I can install Apache from scratch on Trusty, but this seems to be actioned by applying static files from the module rather than by actioning a standard apt-get package installation.
Also, if I pre-install Apache2 with
apt-get install apache2
The standard puppet module code above works.
It seems that at this point you can't use Puppet to install Apache2 from a vanilla Ubuntu Trusty installation.
The same issue is reported here for Debian 7 https://stackoverflow.com/questions/30758036/install-apache-module-with-puppet-on-debian-7