mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-12 15:05:07 +00:00
fixed hidden warnings from extra tests - batch 1 (#10025)
This commit is contained in:
parent
a720e99482
commit
a3b8eed0c4
12 changed files with 353 additions and 352 deletions
|
|
@ -94,7 +94,7 @@ EXAMPLES: |
|
|||
vars:
|
||||
input: {}
|
||||
# => {"~/": "qux"}
|
||||
|
||||
|
||||
- name: Add at the end of the array
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ input | community.general.json_patch('add', '/-', 4) }}"
|
||||
|
|
@ -136,7 +136,7 @@ EXAMPLES: |
|
|||
vars:
|
||||
input: { "foo": { "one": 1 }, "bar": { "two": 2 } }
|
||||
# => OK
|
||||
|
||||
|
||||
- name: Unuccessful test
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ input | community.general.json_patch('test', '/bar/two', 9) | ternary('OK', 'Failed') }}"
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ EXAMPLES: |
|
|||
list1: [1, 2, 5, 3, 4, 10]
|
||||
list2: [1, 2, 3, 4, 5, 11, 99]
|
||||
# => [10]
|
||||
|
||||
|
||||
- name: Return the difference of list1, list2 and list3.
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ [list1, list2, list3] | community.general.lists_difference(flatten=true) }}"
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ EXAMPLES: |
|
|||
list1: [1, 2, 5, 3, 4, 10]
|
||||
list2: [1, 2, 3, 4, 5, 11, 99]
|
||||
# => [1, 2, 5, 3, 4]
|
||||
|
||||
|
||||
- name: Return the intersection of list1, list2 and list3.
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ [list1, list2, list3] | community.general.lists_intersect(flatten=true) }}"
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ EXAMPLES: |
|
|||
list1: [1, 2, 5, 3, 4, 10]
|
||||
list2: [1, 2, 3, 4, 5, 11, 99]
|
||||
# => [10, 11, 99]
|
||||
|
||||
|
||||
- name: Return the symmetric difference of list1, list2 and list3.
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ [list1, list2, list3] | community.general.lists_symmetric_difference(flatten=true) }}"
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ EXAMPLES: |
|
|||
list2: [1, 2, 3, 4, 5, 11, 99]
|
||||
list3: [1, 2, 3, 4, 5, 10, 99, 101]
|
||||
# => [1, 2, 5, 3, 4, 10, 11, 99, 101]
|
||||
|
||||
|
||||
- name: Return the union of list1 and list2.
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ [list1, list2] | community.general.lists_union(flatten=true) }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue