Ask for service module state option reload-or-restart

Hi,

Reading http://docs.ansible.com/ansible/latest/service_module.html, in the options table:

state |
|
|
- started
- stopped
- restarted
- reloaded
|

  • | - | - | - |

Not found the systemd option reload-or-restart
I can use this reload-or-restart here?

Regards

That does not make sense in the service action, as it is systemd specific, but we can look into it for the systemd one.

Hi,

The systemd module neither has reload-or-restart option.

In the service action we should use it too the reload-or-restart option, because in Unix, the systemd automatic detects if we have a systemd unit or not, and redirect to systemctl appropiately.

Regards

No, the service action is the 'lowest common denominator' for
services, it should not have something specific to systemd as it will
break with other service plugins (sysvinit, upstart, rc.d, etc).

The systemd module does not currently support it, but it does make
sense to add it there.

No, the service action is the 'lowest common denominator' for
services, it should not have something specific to systemd as it will
break with other service plugins (sysvinit, upstart, rc.d, etc).

The systemd module does not currently support it, but it does make
sense to add it there.

Not for the normal service operations?
Ex:
service slapd start
Redirecting to /bin/systemctl start slapd.service

And for the reload:
service slapd reload-or-restart
Redirecting to /bin/systemctl reload-or-restart slapd.service

the 'service' module is not he same as the 'service' command, the
'service' command is not the same across distributions, it is not even
guaranteed to be present. Those that do have a 'service' command that
are not controlled by systemd do not have the same behaviour as you
show above.