From 707e33793d683254a511cd1ec825df86a5121feb Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Thu, 8 Aug 2019 13:55:11 -0500 Subject: [PATCH] Undeprecated the skip argument for first_found. Fixes #58942. Fixes #59949. (#60161) --- .../fragments/59949-undeprecate-first-found-skip.yml | 4 ++++ lib/ansible/plugins/lookup/first_found.py | 7 ------- 2 files changed, 4 insertions(+), 7 deletions(-) create mode 100644 changelogs/fragments/59949-undeprecate-first-found-skip.yml 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)