example42 / puppet-php

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

Only enable/disable mods once (fixes #113) #114

Closed Slashbunny closed 8 years ago

Slashbunny commented 8 years ago

Currently, puppet runs php5enmod or php5dismod every single puppet run, which triggers Apache to restart. Instead, check to make sure the mod is in the correct state. If it's not, then run the required commands to get the mod in the correct state.

Notes:

Slashbunny commented 8 years ago

The TravisCI failures appear to be unrelated with this change. bundler is unable to install rake on Ruby 1.8.7. The Ruby 1.9.3 builds succeeded.

alvagante commented 8 years ago

Just for the records, a way to us only 1 exec would have been to create a pair of variables ($exec_onlyif, $exec_unless) and assign them the actual command name or undef according to the cases. but it's ok also as done here, thank you