Closed denics closed 2 years ago
The service file should be coming from here: https://github.com/geerlingguy/ansible-role-varnish/blob/2a9976231c29faa82b3448beb18acf033b551267/templates/varnish.service.j2
(And that should be copied across if running Debian 8 or higher: https://github.com/geerlingguy/ansible-role-varnish/blob/2a9976231c29faa82b3448beb18acf033b551267/tasks/main.yml#L33-L46
Ok, then I confirm that it works as expected, but that Debian will overwrite the service file when upgrade, perhaps adding a WARNING in the doc. Thanks for your roles and collections!
The issue in #66 is still present in Debian 10 and Debian 11. It is easy to test, on a vanilla Debian, simply launch your role with custom port and you will see that the system is always using port 8443 (default Debian).
If you open /etc/systemd/system/multi-user.target.wants/varnish.service you will see that the Execute command is hard-coded.
PROPOSED SOLUTION: override default varnish.service with a custom template, maybe I can propose a patch for Debian, I do not know if this the same behavior with other OS