-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Conversation
The test
|
docs/docsite/rst/plugins/lookup.rst
Outdated
@@ -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. |
There was a problem hiding this comment.
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:
docs/docsite/rst/plugins/lookup.rst
Outdated
|
||
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:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To ignore errors:
docs/docsite/rst/plugins/lookup.rst
Outdated
} | ||
|
||
|
||
You can ask it to warn:: |
There was a problem hiding this comment.
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:
docs/docsite/rst/plugins/lookup.rst
Outdated
} | ||
|
||
|
||
Or fail hard:: |
There was a problem hiding this comment.
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:
* document lookup errors optoin * changed to doc * updated as per feedback
* document lookup errors optoin * changed to doc * updated as per feedback
* document lookup errors optoin * changed to doc * updated as per feedback
* document lookup errors optoin * changed to doc * updated as per feedback
* document lookup errors optoin * changed to doc * updated as per feedback (cherry picked from commit 32c2aae)
* document lookup errors optoin * changed to doc * updated as per feedback
* document lookup errors optoin * changed to doc * updated as per feedback
* document lookup errors optoin * changed to doc * updated as per feedback (cherry picked from commit 32c2aae)
* document lookup errors optoin * changed to doc * updated as per feedback
SUMMARY
added feature .. now document it
ISSUE TYPE
COMPONENT NAME
lookup
ANSIBLE VERSION