0

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

  • I did test using ubuntu 14:10 container and I didn't find any problem, please provide puppet apply name_of_the_file.pp --debug – c4f4t0r Jul 29 '15 at 18:19
  • Today, I ran the same test and it appear to be working. I am working in Amazon EC2 here, and deployed a new Ubuntu Trusty instance. I was working with scratch instances yesterday to, just deploying them, installing the puppet client and killing them again. – Garreth McDaid Jul 30 '15 at 9:06

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.