mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
3a01ceb355
Feature. Add chapter 'Lists of dictionaries' to docsite (#8482)
* Feature. Add chapter 'Lists of dictionaries'
* Fix copyright and licensing.
* Add maintainers for docsite chapter 'Lists of dictionaries'.
* Generate docs keep_keys and remove_keys
* Update integration tests of keep_keys and remove_keys
* Update docs helpers of keep_keys and remove_keys
* Fix copyright and licensing.
* Fix remove license from templates. Cleanup.
* Add docs helper replace_keys
* Update integration test filter_replace_keys
* Generate and update:
filter_guide-abstract_informations-lists_of_dictionaries-replace_keys.rst
* Formatting improved.
* Fix results Jinja quotation marks.
* Update docs/docsite/helper/keep_keys/filter_guide-abstract_informations-lists_of_dictionaries-keep_keys.rst.j2
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update docs/docsite/helper/keep_keys/filter_guide-abstract_informations-lists_of_dictionaries-keep_keys.rst.j2
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fix references.
* Updated helpers.
* Fix licenses. Simplified templates.
* Fix licenses.
* Fix README.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit caecb2297f
)
Co-authored-by: Vladimir Botka <vbotka@gmail.com>
79 lines
2.4 KiB
YAML
79 lines
2.4 KiB
YAML
---
|
|
# 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
|
|
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
# Create docs REST files
|
|
# shell> ansible-playbook playbook.yml
|
|
#
|
|
# Proofread and copy created *.rst file into the directory
|
|
# docs/docsite/rst. Do not add *.rst in this directory to the version
|
|
# control.
|
|
#
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
# community.general/docs/docsite/helper/remove_keys/playbook.yml
|
|
|
|
- name: Create RST file for docs/docsite/rst
|
|
hosts: localhost
|
|
gather_facts: false
|
|
|
|
vars:
|
|
|
|
plugin: remove_keys
|
|
plugin_type: filter
|
|
docs_path:
|
|
- filter_guide
|
|
- abstract_informations
|
|
- lists_of_dictionaries
|
|
|
|
file_base: "{{ (docs_path + [plugin]) | join('-') }}"
|
|
file_rst: ../../rst/{{ file_base }}.rst
|
|
file_sha1: "{{ plugin }}.rst.sha1"
|
|
|
|
target: "../../../../tests/integration/targets/{{ plugin_type }}_{{ plugin }}"
|
|
target_vars: "{{ target }}/vars/main/tests.yml"
|
|
target_sha1: tests.yml.sha1
|
|
|
|
tasks:
|
|
|
|
- name: Test integrity tests.yml
|
|
when:
|
|
- integrity | d(true) | bool
|
|
- lookup('file', target_sha1) != lookup('pipe', 'sha1sum ' ~ target_vars)
|
|
block:
|
|
|
|
- name: Changed tests.yml
|
|
ansible.builtin.debug:
|
|
msg: |
|
|
Changed {{ target_vars }}
|
|
Review the changes and update {{ target_sha1 }}
|
|
shell> sha1sum {{ target_vars }} > {{ target_sha1 }}
|
|
|
|
- name: Changed tests.yml end host
|
|
ansible.builtin.meta: end_play
|
|
|
|
- name: Test integrity RST file
|
|
when:
|
|
- integrity | d(true) | bool
|
|
- lookup('file', file_sha1) != lookup('pipe', 'sha1sum ' ~ file_rst)
|
|
block:
|
|
|
|
- name: Changed RST file
|
|
ansible.builtin.debug:
|
|
msg: |
|
|
Changed {{ file_rst }}
|
|
Review the changes and update {{ file_sha1 }}
|
|
shell> sha1sum {{ file_rst }} > {{ file_sha1 }}
|
|
|
|
- name: Changed RST file end host
|
|
ansible.builtin.meta: end_play
|
|
|
|
- name: Include target vars
|
|
include_vars:
|
|
file: "{{ target_vars }}"
|
|
|
|
- name: Create RST file
|
|
ansible.builtin.template:
|
|
src: "{{ file_base }}.rst.j2"
|
|
dest: "{{ file_base }}.rst"
|