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

document lookup errors optoin #39645

Merged
merged 3 commits into from
May 11, 2018
Merged

document lookup errors optoin #39645

merged 3 commits into from
May 11, 2018

Conversation

bcoca
Copy link
Member

@bcoca bcoca commented May 2, 2018

SUMMARY

added feature .. now document it

ISSUE TYPE
  • Docs Pull Request
COMPONENT NAME

lookup

ANSIBLE VERSION
2.5

@bcoca bcoca added this to To Do in 2.5.x blocker list via automation May 2, 2018
@ansibot ansibot added docs This issue/PR relates to or includes documentation. 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 2, 2018
@ansibot
Copy link
Contributor

ansibot commented May 2, 2018

The test ansible-test sanity --test docs-build [explain] failed with 1 error:

docs/docsite/rst/porting_guides/porting_guide_2.5.rst:213:0: undefined-label: undefined label: lookup (if the link has no caption the label must precede a section header)

click here for bot help

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels May 2, 2018
@jborean93 jborean93 removed the needs_triage Needs a first human triage before being processed. label May 3, 2018
@ansibot ansibot removed ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels May 3, 2018
@@ -65,6 +65,46 @@ You can combine lookups with :ref:`playbooks_filters`, :ref:`playbooks_tests` an
- "{{lookup('sequence', 'end=42 start=2 step=2')|map('log', 4)|list)}}"
- ['a', 'c', 'd', 'c']

.. versionadded:: 2.5

All lookups now have an option to handle how errors behave, by default they produce fatal errors for the task, but now the user can control this via the ``errors`` option.
Copy link
Contributor

Choose a reason for hiding this comment

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

Active voice version:
You can now control how errors behave in all lookup plugins by setting errors to ignore, warn, or strict. The default setting is strict, which causes the task to fail. For example:


All lookups now have an option to handle how errors behave, by default they produce fatal errors for the task, but now the user can control this via the ``errors`` option.

You can ignore it::
Copy link
Contributor

Choose a reason for hiding this comment

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

To ignore errors:

}


You can ask it to warn::
Copy link
Contributor

Choose a reason for hiding this comment

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

To get a warning instead of a failure:

}


Or fail hard::
Copy link
Contributor

Choose a reason for hiding this comment

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

To make the task fail:

@bcoca bcoca merged commit 32c2aae into ansible:devel May 11, 2018
@bcoca bcoca deleted the lookup_errors_doc branch May 11, 2018 19:09
oolongbrothers pushed a commit to oolongbrothers/ansible that referenced this pull request May 12, 2018
* document lookup errors optoin

* changed to doc

* updated as per feedback
oolongbrothers pushed a commit to oolongbrothers/ansible that referenced this pull request May 14, 2018
* document lookup errors optoin

* changed to doc

* updated as per feedback
oolongbrothers pushed a commit to oolongbrothers/ansible that referenced this pull request May 14, 2018
* document lookup errors optoin

* changed to doc

* updated as per feedback
tonal pushed a commit to tonal/ansible that referenced this pull request May 15, 2018
* document lookup errors optoin

* changed to doc

* updated as per feedback
bcoca added a commit to bcoca/ansible that referenced this pull request May 15, 2018
* document lookup errors optoin

* changed to doc

* updated as per feedback

(cherry picked from commit 32c2aae)
oolongbrothers pushed a commit to oolongbrothers/ansible that referenced this pull request May 15, 2018
* document lookup errors optoin

* changed to doc

* updated as per feedback
oolongbrothers pushed a commit to oolongbrothers/ansible that referenced this pull request May 15, 2018
* document lookup errors optoin

* changed to doc

* updated as per feedback
bcoca added a commit that referenced this pull request May 15, 2018
* document lookup errors optoin

* changed to doc

* updated as per feedback

(cherry picked from commit 32c2aae)
@bcoca bcoca moved this from To Do to Done in 2.5.x blocker list May 15, 2018
ilicmilan pushed a commit to ilicmilan/ansible that referenced this pull request Nov 7, 2018
* document lookup errors optoin

* changed to doc

* updated as per feedback
@ansible ansible locked and limited conversation to collaborators May 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
docs This issue/PR relates to or includes documentation. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants