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-02-05 21:20:15 +01:00
|
|
|
|
|
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
# 1) Run all examples and create example-XXX.out
|
2024-06-13 07:19:02 +02:00
|
|
|
# shell> ansible-playbook playbook.yml -e examples_one=true
|
2022-01-28 08:19:19 +01:00
|
|
|
#
|
2022-02-05 21:20:15 +01:00
|
|
|
# 2) Optionally, for testing, create examples_all.rst
|
|
|
|
# shell> ansible-playbook playbook.yml -e examples_all=true
|
2022-01-28 08:19:19 +01:00
|
|
|
#
|
2022-02-05 21:20:15 +01:00
|
|
|
# 3) Create docs REST files
|
|
|
|
# shell> ansible-playbook playbook.yml -e merging_lists_of_dictionaries=true
|
2022-01-28 08:19:19 +01:00
|
|
|
#
|
2022-02-05 21:20:15 +01:00
|
|
|
# Notes:
|
|
|
|
# * Use YAML callback, e.g. set ANSIBLE_STDOUT_CALLBACK=community.general.yaml
|
|
|
|
# * Use sphinx-view to render and review the REST files
|
|
|
|
# shell> sphinx-view <path_to_helper>/examples_all.rst
|
|
|
|
# * Proofread and copy completed docs *.rst files into the directory rst.
|
|
|
|
# * Then delete the *.rst and *.out files from this directory. Do not
|
|
|
|
# add *.rst and *.out in this directory to the version control.
|
2022-01-28 08:19:19 +01:00
|
|
|
#
|
2022-02-05 21:20:15 +01:00
|
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
# community.general/docs/docsite/helper/lists_mergeby/playbook.yml
|
|
|
|
|
2022-01-28 08:19:19 +01:00
|
|
|
- hosts: localhost
|
|
|
|
gather_facts: false
|
|
|
|
tasks:
|
|
|
|
|
|
|
|
- block:
|
2022-02-05 21:20:15 +01:00
|
|
|
- import_tasks: example-001.yml
|
2022-01-28 08:19:19 +01:00
|
|
|
tags: t001
|
2022-02-05 21:20:15 +01:00
|
|
|
- import_tasks: example-002.yml
|
2022-01-28 08:19:19 +01:00
|
|
|
tags: t002
|
2022-02-05 21:20:15 +01:00
|
|
|
- import_tasks: example-003.yml
|
2022-01-28 08:19:19 +01:00
|
|
|
tags: t003
|
2022-02-05 21:20:15 +01:00
|
|
|
- import_tasks: example-004.yml
|
2022-01-28 08:19:19 +01:00
|
|
|
tags: t004
|
2022-02-05 21:20:15 +01:00
|
|
|
- import_tasks: example-005.yml
|
2022-01-28 08:19:19 +01:00
|
|
|
tags: t005
|
2022-02-05 21:20:15 +01:00
|
|
|
- import_tasks: example-006.yml
|
2022-01-28 08:19:19 +01:00
|
|
|
tags: t006
|
2022-02-05 21:20:15 +01:00
|
|
|
- import_tasks: example-007.yml
|
2022-01-28 08:19:19 +01:00
|
|
|
tags: t007
|
2022-02-05 21:20:15 +01:00
|
|
|
- import_tasks: example-008.yml
|
2022-01-28 08:19:19 +01:00
|
|
|
tags: t008
|
2024-06-13 07:19:02 +02:00
|
|
|
- import_tasks: example-009.yml
|
|
|
|
tags: t009
|
|
|
|
when: examples_one | d(false) | bool
|
2022-01-28 08:19:19 +01:00
|
|
|
|
|
|
|
- block:
|
|
|
|
- include_vars: examples.yml
|
|
|
|
- template:
|
2022-02-05 21:20:15 +01:00
|
|
|
src: examples_all.rst.j2
|
|
|
|
dest: examples_all.rst
|
2024-06-13 07:19:02 +02:00
|
|
|
when: examples_all | d(false) | bool
|
2022-02-05 21:20:15 +01:00
|
|
|
|
|
|
|
- block:
|
|
|
|
- include_vars: examples.yml
|
|
|
|
- template:
|
|
|
|
src: filter_guide_abstract_informations_merging_lists_of_dictionaries.rst.j2
|
|
|
|
dest: filter_guide_abstract_informations_merging_lists_of_dictionaries.rst
|
2024-06-13 07:19:02 +02:00
|
|
|
when: merging_lists_of_dictionaries | d(false) | bool
|