diff --git a/changelogs/fragments/59949-undeprecate-first-found-skip.yml b/changelogs/fragments/59949-undeprecate-first-found-skip.yml new file mode 100644 index 00000000000..239c890de96 --- /dev/null +++ b/changelogs/fragments/59949-undeprecate-first-found-skip.yml @@ -0,0 +1,4 @@ +bugfixes: +- first_found - Un-deprecate ``skip``, as the alternative of ``errors`` does + not work with ``with_first_found`` and only use of ``lookup`` + (https://github.com/ansible/ansible/issues/58942) diff --git a/lib/ansible/plugins/lookup/first_found.py b/lib/ansible/plugins/lookup/first_found.py index a6fb1b7b8ff..a1828e6b9c7 100644 --- a/lib/ansible/plugins/lookup/first_found.py +++ b/lib/ansible/plugins/lookup/first_found.py @@ -29,10 +29,6 @@ DOCUMENTATION = """ type: boolean default: False description: Return an empty list if no file is found, instead of an error. - deprecated: - why: A generic that applies to all errors exists for all lookups. - version: "2.8" - alternative: The generic ``errors=ignore`` """ EXAMPLES = """ @@ -130,9 +126,6 @@ class LookupModule(LookupBase): for term in terms: if isinstance(term, dict): - if 'skip' in term: - self._display.deprecated('Use errors="ignore" instead of skip', version='2.12') - files = term.get('files', []) paths = term.get('paths', []) skip = boolean(term.get('skip', False), strict=False)