ansible-letsencrypt icon indicating copy to clipboard operation
ansible-letsencrypt copied to clipboard

Allow specifying more than one service to reload

Open cristoper opened this issue 8 years ago • 3 comments

This pull request implements two changes (in two separate commits):

  • 91ecf4f: Allow specifying more than one service to be restarted. This brings a new default variable letsencrypt_restart_services which should be an array of service names.
  • c8933e5: Reload services instead of restarting them (I think this is more appropriate for most services including nginx, postfix, dovecot). This changes the variable name to letsencrypt_reload_services

Both changes are backward compatible with the existing letsencrypt_restart_service_name variable.

cristoper avatar Jan 30 '18 16:01 cristoper

Hi,

Can you provide a use case for when multiple services would be necessary to restart? Typically you would have SSL termination done once.

Oh yeah, in the upcoming rewrite it's no longer limited to just restarting services, but you can provide an entire command to execute. This could be useful because who knows what you're running on your server. It might be a service, a docker container or part of a docker-compose project. You would be able to issue a restart or reload too using this strategy.

nickjj avatar Jan 30 '18 16:01 nickjj

In installations with several SSL-enabled services (https, smtps, imaps) on the same machine, I'd expect it is more common to configure them all to directly use the same certificate than to put them behind a multi-protocol reverse proxy doing SSL termination (I could be wrong, though). It seems much more straight-forward to me, anyway.

Regarding the upcoming rewrite: sounds good!

cristoper avatar Jan 30 '18 16:01 cristoper

Ok, good to know. It will be a list of commands to restart then, instead of just 1, as per your PR suggestion, just applied to full commands.

nickjj avatar Jan 30 '18 17:01 nickjj