mirror of https://github.com/ansible/ansible.git
Ignore failure of stop command if start succeeds with state=restarted
In some cases (see issue #1067) with state=restarted, a failure to stop the service (which wasn't running) would appear to the module to be a failure to restart the service even though it successfully started the service. This changes the behavior of the service module to focus on the return code of the start command. If the rc of stop is not 0 and the rc of start does equal 0, it considers the service successfully restarted. It then ignores the rc, stdout, and stderr from the unsuccessful stop command.reviewable/pr18780/r1
parent
d786e876a7
commit
3d09c6cc21
Loading…
Reference in New Issue