21be3b2d4b
The command module accepts "creates" or "deletes" arguments which cause it to internally skip running the command if the referenced path exists or not (as appropriate). This idempotency check is not implemented as a skipped task since it occurs inside the module itself. Instead, the module runs normally from Ansible's point of view and simply returns a message indicating it chose not to run the command. This change updates the zuul_stream callback to check for this message and, if found, terminate the streaming connection immediately without waiting for any data (as we do for skipped tasks). Without this, any command or shell task with a creates or deletes argument would wait 10 seconds for the log stream to terminate. Change-Id: I352f641368dcfc697be9634f26ce3a8393b96c1b