geerlingguy / ansible-role-php

Ansible Role - PHP
https://galaxy.ansible.com/geerlingguy/php/
MIT License
496 stars 441 forks source link

Added possibility to choose if web server is restarted or reloaded #353

Closed KuiKui closed 2 years ago

KuiKui commented 2 years ago

In production systems, it is sometimes better to reload web server instead of restarting it. This commit allows users to manage restart or reload of web server service, but keeps restarting it by default.

Thanks to @rsicart for #300

spocky commented 2 years ago

To add more context, our web app (web site files, but also lower level components such as php or elasticsearch) can be updated by the click of a button. Once playbooks are updated and start playing, we faced what first appeared as a random crash with no log whatsoever. The bottom of it is that if php (or a few other components ftm) gets updated, an ansible handler is automatically set to restart apache. This in turns kills our update script before it has a chance to finish. Setting this value to 'reload' allows the process to finish gracefully which totally fixes this behavior.

Jstham commented 2 years ago

It is indeed a problem as our automation would fall down every now and then.

stale[bot] commented 2 years ago

This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark pull requests as stale.

stale[bot] commented 2 years ago

This pull request has been closed due to inactivity. If you feel this is in error, please reopen the pull request or file a new PR with the relevant details.