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

Honor ignore_errors when invoking the debugger, add config to disable this behavior #39868

Merged
merged 2 commits into from
May 31, 2018

Conversation

sivel
Copy link
Member

@sivel sivel commented May 8, 2018

SUMMARY

Honor ignore_errors when invoking the debugger, add config to disable this behavior. Fixes #39863

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

lib/ansible/config/base.yml
lib/ansible/executor/task_result.py

ANSIBLE VERSION
2.7
ADDITIONAL INFORMATION

@sivel sivel added this to the 2.7.0 milestone May 8, 2018
@ansibot ansibot added feature This issue/PR relates to a feature request. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels May 8, 2018
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label May 8, 2018
ret = True
elif _debugger in ('on_unreachable',) and self.is_unreachable():
elif _debugger in ('on_unreachable',) and self.is_unreachable() and not _ignore_errors:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore_errors doesn't normally cover unreachable

@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label May 8, 2018
@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label May 11, 2018
@ansibot ansibot added affects_2.6 This issue/PR affects Ansible v2.6 stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels May 19, 2018
@sivel
Copy link
Member Author

sivel commented May 31, 2018

rebuild_merge

@ansibot ansibot added stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. and removed stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels May 31, 2018
@ansibot ansibot merged commit 079318b into ansible:devel May 31, 2018
trishnaguha added a commit that referenced this pull request May 31, 2018
jacum pushed a commit to jacum/ansible that referenced this pull request Jun 26, 2018
… this behavior (ansible#39868)

* Honor ignore_errors when invoking the debugger, add config to disable this behavior. Fixes ansible#39863

* Limit ignore_errors logic to failed
@jdh239
Copy link

jdh239 commented Jan 29, 2019

Maybe I don't quite follow this, but I am using Ansible 2.7.6, and when I trigger an error on a task that has ignore_errors: true, I am still getting output from the debugger.

ie.

TASK [Find the user_id for gomer] ********************************************************************************************************************************************************************************************************
fatal: [nagios]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: No first item, sequence was empty.\n\nThe error appears to have been in '/etc/ansible/role/purge_user/tasks/sample.yml': line 10, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n    - name: \"Find the user_id for {{ user }}\"\n      ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes.  Always quote template expression brackets when they\nstart a value. For instance:\n\n    with_items:\n      - {{ foo }}\n\nShould be written as:\n\n    with_items:\n      - \"{{ foo }}\"\n"}
...ignoring

@ansible ansible locked and limited conversation to collaborators May 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.6 This issue/PR affects Ansible v2.6 feature This issue/PR relates to a feature request. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ANSIBLE_STRATEGY=debug and ignore_errors: true does start debugger
5 participants