Skip to content

EOL emitted when no additional updates are found #25

@deoren

Description

@deoren

When calling this script via an Ansible task with conditionals setup to check for any output as a Changed or Failed indicator, the conditional is tripped whenever no further updates are available.

Example task parameters:

  register: shell_result
  changed_when: shell_result.stdout != ""
  failed_when: shell_result.stdout != ""

Example "failure":

fatal: [host.example.com]: FAILED! => {"changed": true, "failed_when_result": true, "rc": 0, "stderr": "Shared connection to host.example.com closed.\r\n", "stderr_lines": ["Shared connection to host.example.com closed."], "stdout": "\r\n", "stdout_lines": [""]}                                                                                                     

This stands out:

  • "stdout": "\r\n"
  • "changed": true
  • "failed_when_result": true
  • "rc": 0

The rc value of 0 seems to indicate success, but the conditionals applied that demand no ouput from the script as a success indicator are tripped whenever a (Windows?) EOL is emitted.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions