jdauphant / ansible-role-nginx

Ansible role to install and manage nginx configuration
655 stars 302 forks source link

Configure start server during the role run and/or at boot #213

Closed jordiclariana closed 6 years ago

jordiclariana commented 6 years ago

Sometimes is not necessary to start Nginx during the role run, so I added the option nginx_start_service, by default true. I also added nginx_start_at_boot, which sets if Nginx should be enabled to start when the machine boots. It defaults to true too. The defaults ensure backwards compatibility

The motivation for this change is for those cases where you have a active-passive Nginx servers and you have a 3rd party application starting or stopping them (like heartbeat, pacemaker, or similar). This is important when you have your Nginxs behind (for instance) a AWS ALB, both at the same time, but you cannot serve both at the same time so you keep one down and the other started with some of the 3rd parties utils I mention before.

I understand this can be a very particular case, but all in all will give more flexibility to the role if needed, after all defaults don't change the actual behavior of the role.

jdauphant commented 6 years ago

ok @jordiclariana Thanks for your contribution

jordiclariana commented 6 years ago

Nice, thanks for being so fast!