Usually when Ansible kicks off a PowerShell script with win_command
/win_shell
/win_psexec
, as long as it doesn't run into errors it'll return "changed", because of course it doesn't know what all the script did.
Since we can return any exit code in a PowerShell script is there a way, via exit codes or otherwise, to notify Ansible that there was no change required so that Ansible returns an "ok" status? Or will it always return "changed" no matter what (assuming no failure)?