FloeDesignTechnologies / ansible-nginx-drupal

Ansible role to configure Nginx for running Drupal using perusio's configuration
Apache License 2.0
22 stars 12 forks source link

Add reload handler #6

Closed cweagans closed 8 years ago

pbuyle commented 10 years ago

Hi,

Thanks you for the pull request. However, the role only configure Nginx to run Drupal sites. It does not manage Nginx itself. I guess the problem you are trying to solve is to reload nginx when its configuration is updated by this role. If a handler is really our only option here, then it should have a less generic name as reload nginx will likely conflict with other role (eg. an nginx role that install nginx).

drupaladmin commented 10 years ago

Hi!

I think that reload nginx is good option

Tell me please what galaxy role do you use as nginx role?

pbuyle commented 10 years ago

I'm using https://galaxy.ansible.com/list#/roles/913, the role does provide a reload handler to restart nginx.

I wonder if the role could provide a reload drupal-nginx handler, but trigger a configurable (via a variable) handler when updating the configuration. This way, the role would be able to handle restarting nginx by default, but let the user use its own handler (or one provided by another role). Thie idea is to avoid restarting nginx twice when both the nginx-drupal role the playbook/another role trigger another handler which does the same action.

drupaladmin commented 10 years ago

Thank you, i try your role. It is good that role use official nginx repo to install nginx. I tried other role and there nginx installing from debian repo (old version).

pbuyle commented 10 years ago

The role will default to your distribution package, but it can easily be configured to use another repo (either a PPA or the official nginx repo).

drupaladmin commented 10 years ago

ok, i will try. Thank you

pbuyle commented 8 years ago

This role does not install nginx or manage it. It only manage its configuration. Therefore, it should not define a way to reload the server. The need for a reload nginx handler is listed in the requirements for the role.