example42 / puppet-php

A puppet module for php. According to Example42 NextGen spec.
Other
45 stars 62 forks source link

service => 'nginx' seems broken #58

Closed mdular closed 10 years ago

mdular commented 10 years ago

declaring

class { 'php': service => 'nginx' }

seems not to be working correctly: it installs apache2 dependencies, which leads to nginx startup failure.

if i manually purge apache2 and ensure php5-cli + php5-cgi to be installed before applying again the module still tries to write apache module config:

Error: Could not set 'present' on ensure: No such file or directory - /etc/php5/apache2/php.ini at 257:/vagrant/puppet/vendor/php/manifests/init.pp

mdular commented 10 years ago

after looking at the module source it's clear that it is working as intended, but the example description had me confused:

"Install php in an nginx environment"

this made me expect an automated installation in my nginx environment ;)

mdular commented 10 years ago

https://github.com/example42/puppet-php/pull/59

Seraf commented 9 years ago

Hello @mdular, did you found a way to prevent install of Apache2 ? I want to use this module but don't want Apache2 ...

Thanks

mdular commented 9 years ago

Hey, yes, i was also planning to create a pull request that allows nginx installation, since there were a few relevant requirements to make it work

You can see how I did it here: https://github.com/mdular/server/blob/master/puppet/components/component_mdular_php/manifests/init.pp

notable parts are, to be executed in sequence:

Seraf commented 9 years ago

@mdular Thanks for your answer even if it continues to install Apache on my side ... I install the packages but the php class installs Apache. I guess I will look for another module :(

mdular commented 9 years ago

are you making sure that the dependencies are being installed before you are including the module? (by using ->)

Seraf commented 9 years ago

Right, it was a problem with the dependancies.

Thanks

mdular commented 9 years ago

Glad it worked :)