From bb695a00a0563893db8b622e3d9f506cc1633bde Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Mon, 2 May 2022 08:16:11 +0200 Subject: [PATCH] Small fixes. (#4605) (#4606) (cherry picked from commit 5cb7c2e45ec1be1d3ab64072ace9a21330823f78) Co-authored-by: Felix Fontein --- plugins/filter/dict.py | 2 +- plugins/filter/from_csv.py | 2 +- plugins/filter/json_query.py | 2 +- plugins/filter/list.py | 7 ++++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/plugins/filter/dict.py b/plugins/filter/dict.py index f18ec1bc24..866e8f8dc2 100644 --- a/plugins/filter/dict.py +++ b/plugins/filter/dict.py @@ -56,7 +56,7 @@ EXAMPLES = ''' RETURN = ''' _value: - description: Whether the module or action plugin denoted by the input exists. + description: The dictionary having the provided key-value pairs. type: boolean ''' diff --git a/plugins/filter/from_csv.py b/plugins/filter/from_csv.py index 8043e36385..269cba046f 100644 --- a/plugins/filter/from_csv.py +++ b/plugins/filter/from_csv.py @@ -52,7 +52,7 @@ DOCUMENTATION = ''' ''' EXAMPLES = ''' -- name: Create a list of dictionaries with map and the community.general.dict filter +- name: Parse a CSV file's contents ansible.builtin.debug: msg: >- {{ csv_data | community.genera.from_csv(dialect='unix') }} diff --git a/plugins/filter/json_query.py b/plugins/filter/json_query.py index e7fb891c6c..7b04455181 100644 --- a/plugins/filter/json_query.py +++ b/plugins/filter/json_query.py @@ -116,7 +116,7 @@ EXAMPLES = ''' RETURN = ''' _value: - description: Whether the module or action plugin denoted by the input exists. + description: The result of the query. type: any ''' diff --git a/plugins/filter/list.py b/plugins/filter/list.py index c92f01a1f1..1c2f9b47bb 100644 --- a/plugins/filter/list.py +++ b/plugins/filter/list.py @@ -33,7 +33,7 @@ DOCUMENTATION = ''' ''' EXAMPLES = ''' -- name: Create a list of dictionaries with map and the community.general.dict filter +- name: Merge two lists ansible.builtin.debug: msg: >- {{ list1 | community.general.lists_mergeby(list2, 'index') }}" @@ -66,8 +66,9 @@ EXAMPLES = ''' RETURN = ''' _value: - description: Whether the module or action plugin denoted by the input exists. - type: boolean + description: The merged list. + type: list + elements: dictionary ''' from ansible.errors import AnsibleError, AnsibleFilterError