Closed stejoo closed 5 years ago
@jlozadad , @otakup0pe , or @UnderGreen ... could you review and comment on this? I'm pretty sure it makes sense because as far as I know the "service" module in Ansible automatically detects and works for service & systemd installations.
PR #394 was raised to fix the naming, but I think that's the wrong way to go and this is the better solution.
Now let's see if the galaxy imports are working 😬
This mostly refers to https://github.com/ANXS/postgresql/issues/361, but perhaps also helps https://github.com/ANXS/postgresql/issues/329.
Currently installation of extensions is broken with an error of a undefined handler. This happens because they still refer to the generic handler instead of the service or systemd specific ones.
Like @evaryont mentioned in issue #361 the use of two separate handlers to restart the Postgresql service is not required. Ansible's service module is designed to be an abstraction, so you do not have to worry about what "init system" is in control of the services. It has no relation to the, and generates the appropriate command. On a system using systemd it will call upon
service
command that's going away on RedHat based system. Ansible's service module figures out when a host uses SysV init, systemd, OpenRC, upstart, rcctl,systemctl
and on a machine that does not it will run the appropriate application or init script.I hope this helps this role along. I'm currently deploying this at a client with the fixes from my pull request. Thanks for all your hard work in making this role awesome.