diff --git a/execute_command_ps.yml b/execute_command_ps.yml index 825e5fe..774f8fc 100644 --- a/execute_command_ps.yml +++ b/execute_command_ps.yml @@ -8,7 +8,5 @@ ansible.windows.win_powershell: script: "{{ command }}" chdir: "{{ execution_path }}" - register: pwsh_output - - - debug: - msg: "{{ pwsh_output.output[0] }}" \ No newline at end of file + register: output + failed_when: output.output[0] != 0 \ No newline at end of file