2022-01-28 08:19:19 +01:00
|
|
|
---
|
2022-08-05 14:03:38 +02:00
|
|
|
# Copyright (c) Ansible Project
|
|
|
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2022-01-28 08:19:19 +01:00
|
|
|
examples:
|
2022-02-05 21:20:15 +01:00
|
|
|
- label: 'In the example below the lists are merged by the attribute ``name``:'
|
|
|
|
file: example-001_vars/list3.yml
|
|
|
|
lang: 'yaml+jinja'
|
|
|
|
- label: 'This produces:'
|
|
|
|
file: example-001.out
|
|
|
|
lang: 'yaml'
|
|
|
|
- label: 'It is possible to use a list of lists as an input of the filter:'
|
|
|
|
file: example-002_vars/list3.yml
|
|
|
|
lang: 'yaml+jinja'
|
|
|
|
- label: 'This produces the same result as in the previous example:'
|
|
|
|
file: example-002.out
|
|
|
|
lang: 'yaml'
|
2022-01-28 08:19:19 +01:00
|
|
|
- label: 'Example ``list_merge=replace`` (default):'
|
2022-02-05 21:20:15 +01:00
|
|
|
file: example-003_vars/list3.yml
|
2022-01-28 08:19:19 +01:00
|
|
|
lang: 'yaml+jinja'
|
|
|
|
- label: 'This produces:'
|
|
|
|
file: example-003.out
|
|
|
|
lang: 'yaml'
|
|
|
|
- label: 'Example ``list_merge=keep``:'
|
2022-02-05 21:20:15 +01:00
|
|
|
file: example-004_vars/list3.yml
|
2022-01-28 08:19:19 +01:00
|
|
|
lang: 'yaml+jinja'
|
|
|
|
- label: 'This produces:'
|
|
|
|
file: example-004.out
|
|
|
|
lang: 'yaml'
|
|
|
|
- label: 'Example ``list_merge=append``:'
|
2022-02-05 21:20:15 +01:00
|
|
|
file: example-005_vars/list3.yml
|
2022-01-28 08:19:19 +01:00
|
|
|
lang: 'yaml+jinja'
|
|
|
|
- label: 'This produces:'
|
|
|
|
file: example-005.out
|
|
|
|
lang: 'yaml'
|
|
|
|
- label: 'Example ``list_merge=prepend``:'
|
2022-02-05 21:20:15 +01:00
|
|
|
file: example-006_vars/list3.yml
|
2022-01-28 08:19:19 +01:00
|
|
|
lang: 'yaml+jinja'
|
|
|
|
- label: 'This produces:'
|
|
|
|
file: example-006.out
|
|
|
|
lang: 'yaml'
|
|
|
|
- label: 'Example ``list_merge=append_rp``:'
|
2022-02-05 21:20:15 +01:00
|
|
|
file: example-007_vars/list3.yml
|
2022-01-28 08:19:19 +01:00
|
|
|
lang: 'yaml+jinja'
|
|
|
|
- label: 'This produces:'
|
|
|
|
file: example-007.out
|
|
|
|
lang: 'yaml'
|
|
|
|
- label: 'Example ``list_merge=prepend_rp``:'
|
2022-02-05 21:20:15 +01:00
|
|
|
file: example-008_vars/list3.yml
|
2022-01-28 08:19:19 +01:00
|
|
|
lang: 'yaml+jinja'
|
|
|
|
- label: 'This produces:'
|
|
|
|
file: example-008.out
|
|
|
|
lang: 'yaml'
|