disable action fails when executed on disabled server
Summary
When you execute disable action multiple times, only first one will succeed.
Steps to reproduce
Run it twice.
Expected behavior
No changed in the second run.
Actual behavior
Second run fails.
Relevant logs and/or screenshots
Monday 17 February 2020 22:40:10 +0100 (0:00:00.715) 0:00:07.234 *******
fatal: [matrix01.stg.iscsi.apl.task.gda.pl]: FAILED! => {"changed": false, "cmd": ["tgt-admin", "--show"], "delta": "0:00:00.066835", "end": "2020-02-17 22:40:10.627895", "msg": "non-zero return code", "rc": 107, "start": "2020-02-17 22:40:10.561060", "stderr": "tgtadm: failed to send request hdr to tgt daemon, Transport endpoint is not connected", "stderr_lines": ["tgtadm: failed to send request hdr to tgt daemon, Transport endpoint is not connected"], "stdout": "Command:\n\ttgtadm -C 0 --op show --mode target\nexited with code: 107.", "stdout_lines": ["Command:", "\ttgtadm -C 0 --op show --mode target", "exited with code: 107."]}
Possible fixes
New ansible returns other services state, so just change the test.