mirror of https://github.com/ansible/ansible.git
system/service.py: fix false-positive service enablement on FreeBSD. (#4283)
sysrc(8) does not exit with non-zero status when encountering a permission error. By using service(8) `service <name> enabled`, we now check the actual semantics expressed through calling sysrc(8), i.e. we check if the service enablement worked from the rc(8) system's perspective. Note that in case service(8) detects the wrong value is still set, we still output the sysrc(8) output in the fail_json() call: the user can derive the exact reason of failure from sysrc(8) output.pull/18777/head
parent
f57ece661f
commit
e526b2ad3d
Loading…
Reference in New Issue