Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EOL emitted when no additional updates are found #25

Open
deoren opened this issue Mar 3, 2019 · 1 comment
Open

EOL emitted when no additional updates are found #25

deoren opened this issue Mar 3, 2019 · 1 comment
Assignees
Labels
Milestone

Comments

@deoren
Copy link
Collaborator

deoren commented Mar 3, 2019

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.

@deoren deoren added the bug label Mar 3, 2019
@deoren deoren self-assigned this Mar 3, 2019
@deoren deoren added this to the v0.2.6 milestone Mar 3, 2019
@deoren
Copy link
Collaborator Author

deoren commented Mar 4, 2019

After a light review, I did not spot where the newline is "leaking" out. The workaround here might very well be to key solely off of return code instead of triggering on script output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant