ansible/test/integration/targets/command_nonexisting/tasks/main.yml
Alexander Sowitzki e6da544310 Let command always return stdout & stderr (#73004)
The `command` module does not return stdout & sterr when calling
a non existing executable or an unknown exception arises. This fix
lets the module return empty byte strings in those cases.
2021-01-22 08:40:53 +01:00

4 lines
No EOL
165 B
YAML

- command: commandthatdoesnotexist --would-be-awkward
register: res
changed_when: "'changed' in res.stdout"
failed_when: "res.stdout != '' or res.stderr != ''"