From 95417744fdb266dbace30c4e8764449adc07d679 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 26 Oct 2022 13:17:01 +0200 Subject: [PATCH] Consider plugins whose last component of FQCN starts with '_' as private. --- changelogs/fragments/56-private.yml | 2 + src/antsibull_docs/data/docsite/plugin.rst.j2 | 9 + src/antsibull_docs/data/docsite/role.rst.j2 | 7 + src/antsibull_docs/write_docs.py | 48 +++- .../collections/ns2/col/_bar_lookup.rst | 260 ++++++++++++++++++ .../collections/ns2/col/foo2_module.rst | 1 + .../collections/ns2/col/foo_become.rst | 1 + .../collections/ns2/col/foo_cache.rst | 1 + .../collections/ns2/col/foo_callback.rst | 1 + .../collections/ns2/col/foo_cliconf.rst | 1 + .../collections/ns2/col/foo_connection.rst | 1 + .../collections/ns2/col/foo_filter.rst | 1 + .../collections/ns2/col/foo_inventory.rst | 1 + .../collections/ns2/col/foo_lookup.rst | 1 + .../collections/ns2/col/foo_module.rst | 1 + .../collections/ns2/col/foo_shell.rst | 1 + .../collections/ns2/col/foo_strategy.rst | 1 + .../collections/ns2/col/foo_test.rst | 1 + .../collections/ns2/col/foo_vars.rst | 1 + .../collections/ns2/col/_bar_lookup.rst | 260 ++++++++++++++++++ .../collections/ns2/col/foo2_module.rst | 1 + .../collections/ns2/col/foo_become.rst | 1 + .../collections/ns2/col/foo_cache.rst | 1 + .../collections/ns2/col/foo_callback.rst | 1 + .../collections/ns2/col/foo_cliconf.rst | 1 + .../collections/ns2/col/foo_connection.rst | 1 + .../collections/ns2/col/foo_filter.rst | 1 + .../collections/ns2/col/foo_inventory.rst | 1 + .../collections/ns2/col/foo_lookup.rst | 1 + .../collections/ns2/col/foo_module.rst | 1 + .../collections/ns2/col/foo_shell.rst | 1 + .../collections/ns2/col/foo_strategy.rst | 1 + .../collections/ns2/col/foo_test.rst | 1 + .../collections/ns2/col/foo_vars.rst | 1 + .../collections/ns2/col/_bar_lookup.rst | 260 ++++++++++++++++++ .../collections/ns2/col/foo2_module.rst | 1 + .../collections/ns2/col/foo_become.rst | 1 + .../collections/ns2/col/foo_cache.rst | 1 + .../collections/ns2/col/foo_callback.rst | 1 + .../collections/ns2/col/foo_cliconf.rst | 1 + .../collections/ns2/col/foo_connection.rst | 1 + .../collections/ns2/col/foo_filter.rst | 1 + .../collections/ns2/col/foo_inventory.rst | 1 + .../collections/ns2/col/foo_lookup.rst | 1 + .../collections/ns2/col/foo_module.rst | 1 + .../collections/ns2/col/foo_shell.rst | 1 + .../collections/ns2/col/foo_strategy.rst | 1 + .../collections/ns2/col/foo_test.rst | 1 + .../collections/ns2/col/foo_vars.rst | 1 + .../baseline-squash-hierarchy/_bar_lookup.rst | 260 ++++++++++++++++++ .../baseline-squash-hierarchy/foo2_module.rst | 1 + .../baseline-squash-hierarchy/foo_become.rst | 1 + .../baseline-squash-hierarchy/foo_cache.rst | 1 + .../foo_callback.rst | 1 + .../baseline-squash-hierarchy/foo_cliconf.rst | 1 + .../foo_connection.rst | 1 + .../baseline-squash-hierarchy/foo_filter.rst | 1 + .../foo_inventory.rst | 1 + .../baseline-squash-hierarchy/foo_lookup.rst | 1 + .../baseline-squash-hierarchy/foo_module.rst | 1 + .../baseline-squash-hierarchy/foo_shell.rst | 1 + .../foo_strategy.rst | 1 + .../baseline-squash-hierarchy/foo_test.rst | 1 + .../baseline-squash-hierarchy/foo_vars.rst | 1 + .../collections/ns2/col/_bar_lookup.rst | 222 +++++++++++++++ .../collections/ns2/col/foo2_module.rst | 1 + .../collections/ns2/col/foo_become.rst | 1 + .../collections/ns2/col/foo_cache.rst | 1 + .../collections/ns2/col/foo_callback.rst | 1 + .../collections/ns2/col/foo_cliconf.rst | 1 + .../collections/ns2/col/foo_connection.rst | 1 + .../collections/ns2/col/foo_filter.rst | 1 + .../collections/ns2/col/foo_inventory.rst | 1 + .../collections/ns2/col/foo_lookup.rst | 1 + .../collections/ns2/col/foo_module.rst | 1 + .../collections/ns2/col/foo_shell.rst | 1 + .../collections/ns2/col/foo_strategy.rst | 1 + .../collections/ns2/col/foo_test.rst | 1 + .../collections/ns2/col/foo_vars.rst | 1 + .../ns2/col/plugins/lookup/_bar.py | 43 +++ 80 files changed, 1436 insertions(+), 5 deletions(-) create mode 100644 changelogs/fragments/56-private.yml create mode 100644 tests/functional/baseline-default/collections/ns2/col/_bar_lookup.rst create mode 100644 tests/functional/baseline-no-breadcrumbs/collections/ns2/col/_bar_lookup.rst create mode 100644 tests/functional/baseline-no-indexes/collections/ns2/col/_bar_lookup.rst create mode 100644 tests/functional/baseline-squash-hierarchy/_bar_lookup.rst create mode 100644 tests/functional/baseline-use-html-blobs/collections/ns2/col/_bar_lookup.rst create mode 100644 tests/functional/collections/ansible_collections/ns2/col/plugins/lookup/_bar.py diff --git a/changelogs/fragments/56-private.yml b/changelogs/fragments/56-private.yml new file mode 100644 index 00000000..c9255917 --- /dev/null +++ b/changelogs/fragments/56-private.yml @@ -0,0 +1,2 @@ +minor_changes: + - "From now on plugins outside ``ansible.builtin`` whose last FQCN component starts with ``_`` are treated as private and marked as such in their documentation, and are no longer listed in plugin indexes (https://github.com/ansible-community/antsibull-docs/pull/56)." diff --git a/src/antsibull_docs/data/docsite/plugin.rst.j2 b/src/antsibull_docs/data/docsite/plugin.rst.j2 index e1258e3a..8c82ddf0 100644 --- a/src/antsibull_docs/data/docsite/plugin.rst.j2 +++ b/src/antsibull_docs/data/docsite/plugin.rst.j2 @@ -139,6 +139,15 @@ DEPRECATED :Alternative: @{ doc['deprecated']['alternative'] | rst_ify }@ {% endif %} +{% if is_private -%} +PRIVATE +------- +The collection considers this {% if plugin_type == 'module' %}module{% else %}@{ plugin_type }@ plugin{% endif %} private. +You can use it with the above FQCN, but be warned that @{ collection }@ might not consider +this {% if plugin_type == 'module' %}module{% else %}@{ plugin_type }@ plugin{% endif %} as part of its public API and +can make breaking changes even in bugfix releases. +{% endif %} + Synopsis -------- diff --git a/src/antsibull_docs/data/docsite/role.rst.j2 b/src/antsibull_docs/data/docsite/role.rst.j2 index 549d21b0..7aa10d60 100644 --- a/src/antsibull_docs/data/docsite/role.rst.j2 +++ b/src/antsibull_docs/data/docsite/role.rst.j2 @@ -112,6 +112,13 @@ DEPRECATED :Alternative: @{ ep_doc['deprecated']['alternative'] | rst_ify }@ {% endif %} +{% if is_private -%} +PRIVATE +------- +The collection considers this role private. You can use it with the above FQCN, but be warned that @{ collection }@ might +not consider this role as part of its public API and can make breaking changes even in bugfix releases. +{% endif %} + Synopsis ^^^^^^^^ diff --git a/src/antsibull_docs/write_docs.py b/src/antsibull_docs/write_docs.py index 01bbf994..38293fce 100644 --- a/src/antsibull_docs/write_docs.py +++ b/src/antsibull_docs/write_docs.py @@ -46,6 +46,19 @@ def _render_template(_template: Template, _name: str, **kwargs) -> str: raise Exception(f"Error while rendering {_name}") from exc +def is_private_plugin(fqcn: str) -> bool: + """ + Return whether the plugin identified by the given FQCN is private. + + Plugins whose last component of the FQCN starts with '_' and which are not part + of ansible.builtin are private. + """ + if fqcn.startswith('ansible.builtin.'): + return False + parts = fqcn.split('.') + return parts[-1].startswith('_') + + def follow_relative_links(path: str) -> str: """ Resolve relative links for path. @@ -189,6 +202,7 @@ def create_plugin_rst(collection_name: str, collection_communication=collection_links.communication, collection_issue_tracker=collection_links.issue_tracker, for_official_docsite=for_official_docsite, + is_private=is_private_plugin(plugin_name), ) else: if log_errors and nonfatal_errors: @@ -213,6 +227,7 @@ def create_plugin_rst(collection_name: str, collection_communication=collection_links.communication, collection_issue_tracker=collection_links.issue_tracker, for_official_docsite=for_official_docsite, + is_private=is_private_plugin(plugin_name), ) else: plugin_contents = _render_template( @@ -232,6 +247,7 @@ def create_plugin_rst(collection_name: str, collection_communication=collection_links.communication, collection_issue_tracker=collection_links.issue_tracker, for_official_docsite=for_official_docsite, + is_private=is_private_plugin(plugin_name), ) flog.debug('Leave') @@ -624,6 +640,25 @@ def _parse_required_ansible(requires_ansible: str) -> t.List[str]: return result +def remove_private_plugins(plugin_maps: t.Mapping[str, t.Mapping[str, str]] + ) -> t.Mapping[str, t.Mapping[str, str]]: + """ + Remove all private plugins, and remove all categories with empty plugin list. + + :arg plugin_maps: Mapping of category_type to Mapping of plugin_name to short_description. + """ + result = {} + for category_type, category_plugins in plugin_maps.items(): + result_plugins = {} + for plugin, value in category_plugins.items(): + if is_private_plugin(plugin): + continue + result_plugins[plugin] = value + if result_plugins: + result[category_type] = result_plugins + return result + + async def write_plugin_lists(collection_name: str, plugin_maps: t.Mapping[str, t.Mapping[str, str]], template: Template, @@ -667,6 +702,7 @@ async def write_plugin_lists(collection_name: str, 'Cannot parse required_ansible specifier set for {collection_name}', collection_name=collection_name, ) + plugin_maps = remove_private_plugins(plugin_maps) index_contents = _render_template( template, dest_dir, @@ -818,11 +854,13 @@ async def output_plugin_indexes(plugin_info: PluginCollectionInfoT, lib_ctx = app_context.lib_ctx.get() async with asyncio_pool.AioPool(size=lib_ctx.thread_max) as pool: for plugin_type, per_collection_data in plugin_info.items(): - filename = os.path.join(collection_toplevel, f'index_{plugin_type}.rst') - writers.append(await pool.spawn( - write_plugin_type_index( - plugin_type, per_collection_data, plugin_list_tmpl, filename, - for_official_docsite=for_official_docsite))) + per_collection_data = remove_private_plugins(per_collection_data) + if per_collection_data: + filename = os.path.join(collection_toplevel, f'index_{plugin_type}.rst') + writers.append(await pool.spawn( + write_plugin_type_index( + plugin_type, per_collection_data, plugin_list_tmpl, filename, + for_official_docsite=for_official_docsite))) await asyncio.gather(*writers) diff --git a/tests/functional/baseline-default/collections/ns2/col/_bar_lookup.rst b/tests/functional/baseline-default/collections/ns2/col/_bar_lookup.rst new file mode 100644 index 00000000..521eeb5a --- /dev/null +++ b/tests/functional/baseline-default/collections/ns2/col/_bar_lookup.rst @@ -0,0 +1,260 @@ + +.. Document meta + +:orphan: +:github_url: https://github.com/ansible-community/antsibull-docs/edit/main/tests/functional/collections/ansible_collections/ns2/col/plugins/lookup/_bar.py?description=%23%23%23%23%23%20SUMMARY%0A%3C!---%20Your%20description%20here%20--%3E%0A%0A%0A%23%23%23%23%23%20ISSUE%20TYPE%0A-%20Docs%20Pull%20Request%0A%0A%2Blabel:%20docsite_pr + +.. |antsibull-internal-nbsp| unicode:: 0xA0 + :trim: + +.. role:: ansible-attribute-support-label +.. role:: ansible-attribute-support-property +.. role:: ansible-attribute-support-full +.. role:: ansible-attribute-support-partial +.. role:: ansible-attribute-support-none +.. role:: ansible-attribute-support-na +.. role:: ansible-option-type +.. role:: ansible-option-elements +.. role:: ansible-option-required +.. role:: ansible-option-versionadded +.. role:: ansible-option-aliases +.. role:: ansible-option-choices +.. role:: ansible-option-choices-default-mark +.. role:: ansible-option-default-bold +.. role:: ansible-option-configuration +.. role:: ansible-option-returned-bold +.. role:: ansible-option-sample-bold + +.. Anchors + +.. _ansible_collections.ns2.col._bar_lookup: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +ns2.col._bar lookup -- Look up some bar ++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This lookup plugin is part of the `ns2.col collection `_ (version 2.1.0). + + To install it, use: :code:`ansible-galaxy collection install ns2.col`. + + To use it in a playbook, specify: :code:`ns2.col._bar`. + +.. version_added + +.. rst-class:: ansible-version-added + +New in ns2.col 1.0.0 + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +PRIVATE +------- +The collection considers this lookup plugin private. +You can use it with the above FQCN, but be warned that ns2.col might not consider +this lookup plugin as part of its public API and +can make breaking changes even in bugfix releases. + +Synopsis +-------- + +.. Description + +- This one is private. + + +.. Aliases + + +.. Requirements + + + + +.. Terms + +Terms +----- + +.. rst-class:: ansible-option-table + +.. list-table:: + :width: 100% + :widths: auto + :header-rows: 1 + + * - Parameter + - Comments + + * - .. raw:: html + +
+
+ + .. _ansible_collections.ns2.col._bar_lookup__parameter-_terms: + + .. rst-class:: ansible-option-title + + **Terms** + + .. raw:: html + + + + .. rst-class:: ansible-option-type-line + + :ansible-option-type:`list` / :ansible-option-elements:`elements=dictionary` / :ansible-option-required:`required` + + + + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Something + + + .. raw:: html + +
+ + + + + +.. Options + + +.. Attributes + + +.. Notes + + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Look up! + ansible.builtin.debug: + msg: "{{ lookup('ns2.col._bar', {}) }}" + + + + +.. Facts + + +.. Return values + +Return Value +------------ + +.. rst-class:: ansible-option-table + +.. list-table:: + :width: 100% + :widths: auto + :header-rows: 1 + + * - Key + - Description + + * - .. raw:: html + +
+
+ + .. _ansible_collections.ns2.col._bar_lookup__return-_raw: + + .. rst-class:: ansible-option-title + + **Return value** + + .. raw:: html + + + + .. rst-class:: ansible-option-type-line + + :ansible-option-type:`list` / :ansible-option-elements:`elements=dictionary` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The resulting stuff. + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` success + + + .. raw:: html + +
+ + + +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- Felix Fontein (@felixfontein) + + +.. hint:: + Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. + +.. Extra links + +Collection links +~~~~~~~~~~~~~~~~ + +.. raw:: html + + + +.. Parsing errors + diff --git a/tests/functional/baseline-default/collections/ns2/col/foo2_module.rst b/tests/functional/baseline-default/collections/ns2/col/foo2_module.rst index 7cc6963c..f0464355 100644 --- a/tests/functional/baseline-default/collections/ns2/col/foo2_module.rst +++ b/tests/functional/baseline-default/collections/ns2/col/foo2_module.rst @@ -59,6 +59,7 @@ ns2.col.foo2 module -- Another foo .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-default/collections/ns2/col/foo_become.rst b/tests/functional/baseline-default/collections/ns2/col/foo_become.rst index a72f549a..d1949cea 100644 --- a/tests/functional/baseline-default/collections/ns2/col/foo_become.rst +++ b/tests/functional/baseline-default/collections/ns2/col/foo_become.rst @@ -59,6 +59,7 @@ ns2.col.foo become -- Use foo .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-default/collections/ns2/col/foo_cache.rst b/tests/functional/baseline-default/collections/ns2/col/foo_cache.rst index 219ae0f6..dfc63808 100644 --- a/tests/functional/baseline-default/collections/ns2/col/foo_cache.rst +++ b/tests/functional/baseline-default/collections/ns2/col/foo_cache.rst @@ -62,6 +62,7 @@ New in ns2.col 1.9.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-default/collections/ns2/col/foo_callback.rst b/tests/functional/baseline-default/collections/ns2/col/foo_callback.rst index aca0781a..73eccc07 100644 --- a/tests/functional/baseline-default/collections/ns2/col/foo_callback.rst +++ b/tests/functional/baseline-default/collections/ns2/col/foo_callback.rst @@ -62,6 +62,7 @@ New in ns2.col 0.0.1 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-default/collections/ns2/col/foo_cliconf.rst b/tests/functional/baseline-default/collections/ns2/col/foo_cliconf.rst index cc1b960c..6987ffc6 100644 --- a/tests/functional/baseline-default/collections/ns2/col/foo_cliconf.rst +++ b/tests/functional/baseline-default/collections/ns2/col/foo_cliconf.rst @@ -59,6 +59,7 @@ ns2.col.foo cliconf -- Foo router CLI config .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-default/collections/ns2/col/foo_connection.rst b/tests/functional/baseline-default/collections/ns2/col/foo_connection.rst index d86619d4..41aa355a 100644 --- a/tests/functional/baseline-default/collections/ns2/col/foo_connection.rst +++ b/tests/functional/baseline-default/collections/ns2/col/foo_connection.rst @@ -62,6 +62,7 @@ New in ns2.col 1.2.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-default/collections/ns2/col/foo_filter.rst b/tests/functional/baseline-default/collections/ns2/col/foo_filter.rst index fe22438a..72f74e22 100644 --- a/tests/functional/baseline-default/collections/ns2/col/foo_filter.rst +++ b/tests/functional/baseline-default/collections/ns2/col/foo_filter.rst @@ -62,6 +62,7 @@ New in ns2.col 1.3.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-default/collections/ns2/col/foo_inventory.rst b/tests/functional/baseline-default/collections/ns2/col/foo_inventory.rst index 05b86c02..4b7e190b 100644 --- a/tests/functional/baseline-default/collections/ns2/col/foo_inventory.rst +++ b/tests/functional/baseline-default/collections/ns2/col/foo_inventory.rst @@ -62,6 +62,7 @@ New in ns2.col 0.5.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-default/collections/ns2/col/foo_lookup.rst b/tests/functional/baseline-default/collections/ns2/col/foo_lookup.rst index a48b569b..8db96367 100644 --- a/tests/functional/baseline-default/collections/ns2/col/foo_lookup.rst +++ b/tests/functional/baseline-default/collections/ns2/col/foo_lookup.rst @@ -62,6 +62,7 @@ New in ns2.col 1.0.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-default/collections/ns2/col/foo_module.rst b/tests/functional/baseline-default/collections/ns2/col/foo_module.rst index 3f2b91d1..195ee5f0 100644 --- a/tests/functional/baseline-default/collections/ns2/col/foo_module.rst +++ b/tests/functional/baseline-default/collections/ns2/col/foo_module.rst @@ -64,6 +64,7 @@ New in ns2.col 2.0.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-default/collections/ns2/col/foo_shell.rst b/tests/functional/baseline-default/collections/ns2/col/foo_shell.rst index 8ed400f9..d29ccecc 100644 --- a/tests/functional/baseline-default/collections/ns2/col/foo_shell.rst +++ b/tests/functional/baseline-default/collections/ns2/col/foo_shell.rst @@ -62,6 +62,7 @@ New in ns2.col 1.0.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-default/collections/ns2/col/foo_strategy.rst b/tests/functional/baseline-default/collections/ns2/col/foo_strategy.rst index 6dddc7de..c6a87fe0 100644 --- a/tests/functional/baseline-default/collections/ns2/col/foo_strategy.rst +++ b/tests/functional/baseline-default/collections/ns2/col/foo_strategy.rst @@ -62,6 +62,7 @@ New in ns2.col 1.1.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-default/collections/ns2/col/foo_test.rst b/tests/functional/baseline-default/collections/ns2/col/foo_test.rst index e2712977..6fb98c55 100644 --- a/tests/functional/baseline-default/collections/ns2/col/foo_test.rst +++ b/tests/functional/baseline-default/collections/ns2/col/foo_test.rst @@ -59,6 +59,7 @@ ns2.col.foo test -- Is something a foo .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-default/collections/ns2/col/foo_vars.rst b/tests/functional/baseline-default/collections/ns2/col/foo_vars.rst index 0df3babc..22f4176d 100644 --- a/tests/functional/baseline-default/collections/ns2/col/foo_vars.rst +++ b/tests/functional/baseline-default/collections/ns2/col/foo_vars.rst @@ -64,6 +64,7 @@ New in ns2.col 0.9.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/_bar_lookup.rst b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/_bar_lookup.rst new file mode 100644 index 00000000..521eeb5a --- /dev/null +++ b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/_bar_lookup.rst @@ -0,0 +1,260 @@ + +.. Document meta + +:orphan: +:github_url: https://github.com/ansible-community/antsibull-docs/edit/main/tests/functional/collections/ansible_collections/ns2/col/plugins/lookup/_bar.py?description=%23%23%23%23%23%20SUMMARY%0A%3C!---%20Your%20description%20here%20--%3E%0A%0A%0A%23%23%23%23%23%20ISSUE%20TYPE%0A-%20Docs%20Pull%20Request%0A%0A%2Blabel:%20docsite_pr + +.. |antsibull-internal-nbsp| unicode:: 0xA0 + :trim: + +.. role:: ansible-attribute-support-label +.. role:: ansible-attribute-support-property +.. role:: ansible-attribute-support-full +.. role:: ansible-attribute-support-partial +.. role:: ansible-attribute-support-none +.. role:: ansible-attribute-support-na +.. role:: ansible-option-type +.. role:: ansible-option-elements +.. role:: ansible-option-required +.. role:: ansible-option-versionadded +.. role:: ansible-option-aliases +.. role:: ansible-option-choices +.. role:: ansible-option-choices-default-mark +.. role:: ansible-option-default-bold +.. role:: ansible-option-configuration +.. role:: ansible-option-returned-bold +.. role:: ansible-option-sample-bold + +.. Anchors + +.. _ansible_collections.ns2.col._bar_lookup: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +ns2.col._bar lookup -- Look up some bar ++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This lookup plugin is part of the `ns2.col collection `_ (version 2.1.0). + + To install it, use: :code:`ansible-galaxy collection install ns2.col`. + + To use it in a playbook, specify: :code:`ns2.col._bar`. + +.. version_added + +.. rst-class:: ansible-version-added + +New in ns2.col 1.0.0 + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +PRIVATE +------- +The collection considers this lookup plugin private. +You can use it with the above FQCN, but be warned that ns2.col might not consider +this lookup plugin as part of its public API and +can make breaking changes even in bugfix releases. + +Synopsis +-------- + +.. Description + +- This one is private. + + +.. Aliases + + +.. Requirements + + + + +.. Terms + +Terms +----- + +.. rst-class:: ansible-option-table + +.. list-table:: + :width: 100% + :widths: auto + :header-rows: 1 + + * - Parameter + - Comments + + * - .. raw:: html + +
+
+ + .. _ansible_collections.ns2.col._bar_lookup__parameter-_terms: + + .. rst-class:: ansible-option-title + + **Terms** + + .. raw:: html + + + + .. rst-class:: ansible-option-type-line + + :ansible-option-type:`list` / :ansible-option-elements:`elements=dictionary` / :ansible-option-required:`required` + + + + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Something + + + .. raw:: html + +
+ + + + + +.. Options + + +.. Attributes + + +.. Notes + + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Look up! + ansible.builtin.debug: + msg: "{{ lookup('ns2.col._bar', {}) }}" + + + + +.. Facts + + +.. Return values + +Return Value +------------ + +.. rst-class:: ansible-option-table + +.. list-table:: + :width: 100% + :widths: auto + :header-rows: 1 + + * - Key + - Description + + * - .. raw:: html + +
+
+ + .. _ansible_collections.ns2.col._bar_lookup__return-_raw: + + .. rst-class:: ansible-option-title + + **Return value** + + .. raw:: html + + + + .. rst-class:: ansible-option-type-line + + :ansible-option-type:`list` / :ansible-option-elements:`elements=dictionary` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The resulting stuff. + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` success + + + .. raw:: html + +
+ + + +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- Felix Fontein (@felixfontein) + + +.. hint:: + Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. + +.. Extra links + +Collection links +~~~~~~~~~~~~~~~~ + +.. raw:: html + + + +.. Parsing errors + diff --git a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo2_module.rst b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo2_module.rst index 7cc6963c..f0464355 100644 --- a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo2_module.rst +++ b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo2_module.rst @@ -59,6 +59,7 @@ ns2.col.foo2 module -- Another foo .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_become.rst b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_become.rst index a72f549a..d1949cea 100644 --- a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_become.rst +++ b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_become.rst @@ -59,6 +59,7 @@ ns2.col.foo become -- Use foo .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_cache.rst b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_cache.rst index 219ae0f6..dfc63808 100644 --- a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_cache.rst +++ b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_cache.rst @@ -62,6 +62,7 @@ New in ns2.col 1.9.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_callback.rst b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_callback.rst index aca0781a..73eccc07 100644 --- a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_callback.rst +++ b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_callback.rst @@ -62,6 +62,7 @@ New in ns2.col 0.0.1 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_cliconf.rst b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_cliconf.rst index cc1b960c..6987ffc6 100644 --- a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_cliconf.rst +++ b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_cliconf.rst @@ -59,6 +59,7 @@ ns2.col.foo cliconf -- Foo router CLI config .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_connection.rst b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_connection.rst index d86619d4..41aa355a 100644 --- a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_connection.rst +++ b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_connection.rst @@ -62,6 +62,7 @@ New in ns2.col 1.2.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_filter.rst b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_filter.rst index fe22438a..72f74e22 100644 --- a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_filter.rst +++ b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_filter.rst @@ -62,6 +62,7 @@ New in ns2.col 1.3.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_inventory.rst b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_inventory.rst index 05b86c02..4b7e190b 100644 --- a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_inventory.rst +++ b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_inventory.rst @@ -62,6 +62,7 @@ New in ns2.col 0.5.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_lookup.rst b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_lookup.rst index a48b569b..8db96367 100644 --- a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_lookup.rst +++ b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_lookup.rst @@ -62,6 +62,7 @@ New in ns2.col 1.0.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_module.rst b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_module.rst index 3f2b91d1..195ee5f0 100644 --- a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_module.rst +++ b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_module.rst @@ -64,6 +64,7 @@ New in ns2.col 2.0.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_shell.rst b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_shell.rst index 8ed400f9..d29ccecc 100644 --- a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_shell.rst +++ b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_shell.rst @@ -62,6 +62,7 @@ New in ns2.col 1.0.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_strategy.rst b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_strategy.rst index 6dddc7de..c6a87fe0 100644 --- a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_strategy.rst +++ b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_strategy.rst @@ -62,6 +62,7 @@ New in ns2.col 1.1.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_test.rst b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_test.rst index e2712977..6fb98c55 100644 --- a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_test.rst +++ b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_test.rst @@ -59,6 +59,7 @@ ns2.col.foo test -- Is something a foo .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_vars.rst b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_vars.rst index 0df3babc..22f4176d 100644 --- a/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_vars.rst +++ b/tests/functional/baseline-no-breadcrumbs/collections/ns2/col/foo_vars.rst @@ -64,6 +64,7 @@ New in ns2.col 0.9.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-indexes/collections/ns2/col/_bar_lookup.rst b/tests/functional/baseline-no-indexes/collections/ns2/col/_bar_lookup.rst new file mode 100644 index 00000000..521eeb5a --- /dev/null +++ b/tests/functional/baseline-no-indexes/collections/ns2/col/_bar_lookup.rst @@ -0,0 +1,260 @@ + +.. Document meta + +:orphan: +:github_url: https://github.com/ansible-community/antsibull-docs/edit/main/tests/functional/collections/ansible_collections/ns2/col/plugins/lookup/_bar.py?description=%23%23%23%23%23%20SUMMARY%0A%3C!---%20Your%20description%20here%20--%3E%0A%0A%0A%23%23%23%23%23%20ISSUE%20TYPE%0A-%20Docs%20Pull%20Request%0A%0A%2Blabel:%20docsite_pr + +.. |antsibull-internal-nbsp| unicode:: 0xA0 + :trim: + +.. role:: ansible-attribute-support-label +.. role:: ansible-attribute-support-property +.. role:: ansible-attribute-support-full +.. role:: ansible-attribute-support-partial +.. role:: ansible-attribute-support-none +.. role:: ansible-attribute-support-na +.. role:: ansible-option-type +.. role:: ansible-option-elements +.. role:: ansible-option-required +.. role:: ansible-option-versionadded +.. role:: ansible-option-aliases +.. role:: ansible-option-choices +.. role:: ansible-option-choices-default-mark +.. role:: ansible-option-default-bold +.. role:: ansible-option-configuration +.. role:: ansible-option-returned-bold +.. role:: ansible-option-sample-bold + +.. Anchors + +.. _ansible_collections.ns2.col._bar_lookup: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +ns2.col._bar lookup -- Look up some bar ++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This lookup plugin is part of the `ns2.col collection `_ (version 2.1.0). + + To install it, use: :code:`ansible-galaxy collection install ns2.col`. + + To use it in a playbook, specify: :code:`ns2.col._bar`. + +.. version_added + +.. rst-class:: ansible-version-added + +New in ns2.col 1.0.0 + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +PRIVATE +------- +The collection considers this lookup plugin private. +You can use it with the above FQCN, but be warned that ns2.col might not consider +this lookup plugin as part of its public API and +can make breaking changes even in bugfix releases. + +Synopsis +-------- + +.. Description + +- This one is private. + + +.. Aliases + + +.. Requirements + + + + +.. Terms + +Terms +----- + +.. rst-class:: ansible-option-table + +.. list-table:: + :width: 100% + :widths: auto + :header-rows: 1 + + * - Parameter + - Comments + + * - .. raw:: html + +
+
+ + .. _ansible_collections.ns2.col._bar_lookup__parameter-_terms: + + .. rst-class:: ansible-option-title + + **Terms** + + .. raw:: html + + + + .. rst-class:: ansible-option-type-line + + :ansible-option-type:`list` / :ansible-option-elements:`elements=dictionary` / :ansible-option-required:`required` + + + + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Something + + + .. raw:: html + +
+ + + + + +.. Options + + +.. Attributes + + +.. Notes + + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Look up! + ansible.builtin.debug: + msg: "{{ lookup('ns2.col._bar', {}) }}" + + + + +.. Facts + + +.. Return values + +Return Value +------------ + +.. rst-class:: ansible-option-table + +.. list-table:: + :width: 100% + :widths: auto + :header-rows: 1 + + * - Key + - Description + + * - .. raw:: html + +
+
+ + .. _ansible_collections.ns2.col._bar_lookup__return-_raw: + + .. rst-class:: ansible-option-title + + **Return value** + + .. raw:: html + + + + .. rst-class:: ansible-option-type-line + + :ansible-option-type:`list` / :ansible-option-elements:`elements=dictionary` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The resulting stuff. + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` success + + + .. raw:: html + +
+ + + +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- Felix Fontein (@felixfontein) + + +.. hint:: + Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. + +.. Extra links + +Collection links +~~~~~~~~~~~~~~~~ + +.. raw:: html + + + +.. Parsing errors + diff --git a/tests/functional/baseline-no-indexes/collections/ns2/col/foo2_module.rst b/tests/functional/baseline-no-indexes/collections/ns2/col/foo2_module.rst index 7cc6963c..f0464355 100644 --- a/tests/functional/baseline-no-indexes/collections/ns2/col/foo2_module.rst +++ b/tests/functional/baseline-no-indexes/collections/ns2/col/foo2_module.rst @@ -59,6 +59,7 @@ ns2.col.foo2 module -- Another foo .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_become.rst b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_become.rst index a72f549a..d1949cea 100644 --- a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_become.rst +++ b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_become.rst @@ -59,6 +59,7 @@ ns2.col.foo become -- Use foo .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_cache.rst b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_cache.rst index 219ae0f6..dfc63808 100644 --- a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_cache.rst +++ b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_cache.rst @@ -62,6 +62,7 @@ New in ns2.col 1.9.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_callback.rst b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_callback.rst index aca0781a..73eccc07 100644 --- a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_callback.rst +++ b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_callback.rst @@ -62,6 +62,7 @@ New in ns2.col 0.0.1 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_cliconf.rst b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_cliconf.rst index cc1b960c..6987ffc6 100644 --- a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_cliconf.rst +++ b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_cliconf.rst @@ -59,6 +59,7 @@ ns2.col.foo cliconf -- Foo router CLI config .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_connection.rst b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_connection.rst index d86619d4..41aa355a 100644 --- a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_connection.rst +++ b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_connection.rst @@ -62,6 +62,7 @@ New in ns2.col 1.2.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_filter.rst b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_filter.rst index fe22438a..72f74e22 100644 --- a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_filter.rst +++ b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_filter.rst @@ -62,6 +62,7 @@ New in ns2.col 1.3.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_inventory.rst b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_inventory.rst index 05b86c02..4b7e190b 100644 --- a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_inventory.rst +++ b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_inventory.rst @@ -62,6 +62,7 @@ New in ns2.col 0.5.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_lookup.rst b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_lookup.rst index a48b569b..8db96367 100644 --- a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_lookup.rst +++ b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_lookup.rst @@ -62,6 +62,7 @@ New in ns2.col 1.0.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_module.rst b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_module.rst index 3f2b91d1..195ee5f0 100644 --- a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_module.rst +++ b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_module.rst @@ -64,6 +64,7 @@ New in ns2.col 2.0.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_shell.rst b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_shell.rst index 8ed400f9..d29ccecc 100644 --- a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_shell.rst +++ b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_shell.rst @@ -62,6 +62,7 @@ New in ns2.col 1.0.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_strategy.rst b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_strategy.rst index 6dddc7de..c6a87fe0 100644 --- a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_strategy.rst +++ b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_strategy.rst @@ -62,6 +62,7 @@ New in ns2.col 1.1.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_test.rst b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_test.rst index e2712977..6fb98c55 100644 --- a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_test.rst +++ b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_test.rst @@ -59,6 +59,7 @@ ns2.col.foo test -- Is something a foo .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_vars.rst b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_vars.rst index 0df3babc..22f4176d 100644 --- a/tests/functional/baseline-no-indexes/collections/ns2/col/foo_vars.rst +++ b/tests/functional/baseline-no-indexes/collections/ns2/col/foo_vars.rst @@ -64,6 +64,7 @@ New in ns2.col 0.9.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-squash-hierarchy/_bar_lookup.rst b/tests/functional/baseline-squash-hierarchy/_bar_lookup.rst new file mode 100644 index 00000000..521eeb5a --- /dev/null +++ b/tests/functional/baseline-squash-hierarchy/_bar_lookup.rst @@ -0,0 +1,260 @@ + +.. Document meta + +:orphan: +:github_url: https://github.com/ansible-community/antsibull-docs/edit/main/tests/functional/collections/ansible_collections/ns2/col/plugins/lookup/_bar.py?description=%23%23%23%23%23%20SUMMARY%0A%3C!---%20Your%20description%20here%20--%3E%0A%0A%0A%23%23%23%23%23%20ISSUE%20TYPE%0A-%20Docs%20Pull%20Request%0A%0A%2Blabel:%20docsite_pr + +.. |antsibull-internal-nbsp| unicode:: 0xA0 + :trim: + +.. role:: ansible-attribute-support-label +.. role:: ansible-attribute-support-property +.. role:: ansible-attribute-support-full +.. role:: ansible-attribute-support-partial +.. role:: ansible-attribute-support-none +.. role:: ansible-attribute-support-na +.. role:: ansible-option-type +.. role:: ansible-option-elements +.. role:: ansible-option-required +.. role:: ansible-option-versionadded +.. role:: ansible-option-aliases +.. role:: ansible-option-choices +.. role:: ansible-option-choices-default-mark +.. role:: ansible-option-default-bold +.. role:: ansible-option-configuration +.. role:: ansible-option-returned-bold +.. role:: ansible-option-sample-bold + +.. Anchors + +.. _ansible_collections.ns2.col._bar_lookup: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +ns2.col._bar lookup -- Look up some bar ++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This lookup plugin is part of the `ns2.col collection `_ (version 2.1.0). + + To install it, use: :code:`ansible-galaxy collection install ns2.col`. + + To use it in a playbook, specify: :code:`ns2.col._bar`. + +.. version_added + +.. rst-class:: ansible-version-added + +New in ns2.col 1.0.0 + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +PRIVATE +------- +The collection considers this lookup plugin private. +You can use it with the above FQCN, but be warned that ns2.col might not consider +this lookup plugin as part of its public API and +can make breaking changes even in bugfix releases. + +Synopsis +-------- + +.. Description + +- This one is private. + + +.. Aliases + + +.. Requirements + + + + +.. Terms + +Terms +----- + +.. rst-class:: ansible-option-table + +.. list-table:: + :width: 100% + :widths: auto + :header-rows: 1 + + * - Parameter + - Comments + + * - .. raw:: html + +
+
+ + .. _ansible_collections.ns2.col._bar_lookup__parameter-_terms: + + .. rst-class:: ansible-option-title + + **Terms** + + .. raw:: html + + + + .. rst-class:: ansible-option-type-line + + :ansible-option-type:`list` / :ansible-option-elements:`elements=dictionary` / :ansible-option-required:`required` + + + + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Something + + + .. raw:: html + +
+ + + + + +.. Options + + +.. Attributes + + +.. Notes + + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Look up! + ansible.builtin.debug: + msg: "{{ lookup('ns2.col._bar', {}) }}" + + + + +.. Facts + + +.. Return values + +Return Value +------------ + +.. rst-class:: ansible-option-table + +.. list-table:: + :width: 100% + :widths: auto + :header-rows: 1 + + * - Key + - Description + + * - .. raw:: html + +
+
+ + .. _ansible_collections.ns2.col._bar_lookup__return-_raw: + + .. rst-class:: ansible-option-title + + **Return value** + + .. raw:: html + + + + .. rst-class:: ansible-option-type-line + + :ansible-option-type:`list` / :ansible-option-elements:`elements=dictionary` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The resulting stuff. + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` success + + + .. raw:: html + +
+ + + +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- Felix Fontein (@felixfontein) + + +.. hint:: + Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. + +.. Extra links + +Collection links +~~~~~~~~~~~~~~~~ + +.. raw:: html + + + +.. Parsing errors + diff --git a/tests/functional/baseline-squash-hierarchy/foo2_module.rst b/tests/functional/baseline-squash-hierarchy/foo2_module.rst index 7cc6963c..f0464355 100644 --- a/tests/functional/baseline-squash-hierarchy/foo2_module.rst +++ b/tests/functional/baseline-squash-hierarchy/foo2_module.rst @@ -59,6 +59,7 @@ ns2.col.foo2 module -- Another foo .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-squash-hierarchy/foo_become.rst b/tests/functional/baseline-squash-hierarchy/foo_become.rst index a72f549a..d1949cea 100644 --- a/tests/functional/baseline-squash-hierarchy/foo_become.rst +++ b/tests/functional/baseline-squash-hierarchy/foo_become.rst @@ -59,6 +59,7 @@ ns2.col.foo become -- Use foo .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-squash-hierarchy/foo_cache.rst b/tests/functional/baseline-squash-hierarchy/foo_cache.rst index 219ae0f6..dfc63808 100644 --- a/tests/functional/baseline-squash-hierarchy/foo_cache.rst +++ b/tests/functional/baseline-squash-hierarchy/foo_cache.rst @@ -62,6 +62,7 @@ New in ns2.col 1.9.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-squash-hierarchy/foo_callback.rst b/tests/functional/baseline-squash-hierarchy/foo_callback.rst index aca0781a..73eccc07 100644 --- a/tests/functional/baseline-squash-hierarchy/foo_callback.rst +++ b/tests/functional/baseline-squash-hierarchy/foo_callback.rst @@ -62,6 +62,7 @@ New in ns2.col 0.0.1 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-squash-hierarchy/foo_cliconf.rst b/tests/functional/baseline-squash-hierarchy/foo_cliconf.rst index cc1b960c..6987ffc6 100644 --- a/tests/functional/baseline-squash-hierarchy/foo_cliconf.rst +++ b/tests/functional/baseline-squash-hierarchy/foo_cliconf.rst @@ -59,6 +59,7 @@ ns2.col.foo cliconf -- Foo router CLI config .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-squash-hierarchy/foo_connection.rst b/tests/functional/baseline-squash-hierarchy/foo_connection.rst index d86619d4..41aa355a 100644 --- a/tests/functional/baseline-squash-hierarchy/foo_connection.rst +++ b/tests/functional/baseline-squash-hierarchy/foo_connection.rst @@ -62,6 +62,7 @@ New in ns2.col 1.2.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-squash-hierarchy/foo_filter.rst b/tests/functional/baseline-squash-hierarchy/foo_filter.rst index fe22438a..72f74e22 100644 --- a/tests/functional/baseline-squash-hierarchy/foo_filter.rst +++ b/tests/functional/baseline-squash-hierarchy/foo_filter.rst @@ -62,6 +62,7 @@ New in ns2.col 1.3.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-squash-hierarchy/foo_inventory.rst b/tests/functional/baseline-squash-hierarchy/foo_inventory.rst index 05b86c02..4b7e190b 100644 --- a/tests/functional/baseline-squash-hierarchy/foo_inventory.rst +++ b/tests/functional/baseline-squash-hierarchy/foo_inventory.rst @@ -62,6 +62,7 @@ New in ns2.col 0.5.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-squash-hierarchy/foo_lookup.rst b/tests/functional/baseline-squash-hierarchy/foo_lookup.rst index a48b569b..8db96367 100644 --- a/tests/functional/baseline-squash-hierarchy/foo_lookup.rst +++ b/tests/functional/baseline-squash-hierarchy/foo_lookup.rst @@ -62,6 +62,7 @@ New in ns2.col 1.0.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-squash-hierarchy/foo_module.rst b/tests/functional/baseline-squash-hierarchy/foo_module.rst index 3f2b91d1..195ee5f0 100644 --- a/tests/functional/baseline-squash-hierarchy/foo_module.rst +++ b/tests/functional/baseline-squash-hierarchy/foo_module.rst @@ -64,6 +64,7 @@ New in ns2.col 2.0.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-squash-hierarchy/foo_shell.rst b/tests/functional/baseline-squash-hierarchy/foo_shell.rst index 8ed400f9..d29ccecc 100644 --- a/tests/functional/baseline-squash-hierarchy/foo_shell.rst +++ b/tests/functional/baseline-squash-hierarchy/foo_shell.rst @@ -62,6 +62,7 @@ New in ns2.col 1.0.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-squash-hierarchy/foo_strategy.rst b/tests/functional/baseline-squash-hierarchy/foo_strategy.rst index 6dddc7de..c6a87fe0 100644 --- a/tests/functional/baseline-squash-hierarchy/foo_strategy.rst +++ b/tests/functional/baseline-squash-hierarchy/foo_strategy.rst @@ -62,6 +62,7 @@ New in ns2.col 1.1.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-squash-hierarchy/foo_test.rst b/tests/functional/baseline-squash-hierarchy/foo_test.rst index e2712977..6fb98c55 100644 --- a/tests/functional/baseline-squash-hierarchy/foo_test.rst +++ b/tests/functional/baseline-squash-hierarchy/foo_test.rst @@ -59,6 +59,7 @@ ns2.col.foo test -- Is something a foo .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-squash-hierarchy/foo_vars.rst b/tests/functional/baseline-squash-hierarchy/foo_vars.rst index 0df3babc..22f4176d 100644 --- a/tests/functional/baseline-squash-hierarchy/foo_vars.rst +++ b/tests/functional/baseline-squash-hierarchy/foo_vars.rst @@ -64,6 +64,7 @@ New in ns2.col 0.9.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-use-html-blobs/collections/ns2/col/_bar_lookup.rst b/tests/functional/baseline-use-html-blobs/collections/ns2/col/_bar_lookup.rst new file mode 100644 index 00000000..b07beeb7 --- /dev/null +++ b/tests/functional/baseline-use-html-blobs/collections/ns2/col/_bar_lookup.rst @@ -0,0 +1,222 @@ + +.. Document meta + +:orphan: +:github_url: https://github.com/ansible-community/antsibull-docs/edit/main/tests/functional/collections/ansible_collections/ns2/col/plugins/lookup/_bar.py?description=%23%23%23%23%23%20SUMMARY%0A%3C!---%20Your%20description%20here%20--%3E%0A%0A%0A%23%23%23%23%23%20ISSUE%20TYPE%0A-%20Docs%20Pull%20Request%0A%0A%2Blabel:%20docsite_pr + +.. |antsibull-internal-nbsp| unicode:: 0xA0 + :trim: + +.. role:: ansible-attribute-support-label +.. role:: ansible-attribute-support-property +.. role:: ansible-attribute-support-full +.. role:: ansible-attribute-support-partial +.. role:: ansible-attribute-support-none +.. role:: ansible-attribute-support-na +.. role:: ansible-option-type +.. role:: ansible-option-elements +.. role:: ansible-option-required +.. role:: ansible-option-versionadded +.. role:: ansible-option-aliases +.. role:: ansible-option-choices +.. role:: ansible-option-choices-default-mark +.. role:: ansible-option-default-bold +.. role:: ansible-option-configuration +.. role:: ansible-option-returned-bold +.. role:: ansible-option-sample-bold + +.. Anchors + +.. _ansible_collections.ns2.col._bar_lookup: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +ns2.col._bar lookup -- Look up some bar ++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This lookup plugin is part of the `ns2.col collection `_ (version 2.1.0). + + To install it, use: :code:`ansible-galaxy collection install ns2.col`. + + To use it in a playbook, specify: :code:`ns2.col._bar`. + +.. version_added + +.. rst-class:: ansible-version-added + +New in ns2.col 1.0.0 + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +PRIVATE +------- +The collection considers this lookup plugin private. +You can use it with the above FQCN, but be warned that ns2.col might not consider +this lookup plugin as part of its public API and +can make breaking changes even in bugfix releases. + +Synopsis +-------- + +.. Description + +- This one is private. + + +.. Aliases + + +.. Requirements + + + + +.. Terms + +Terms +----- + +.. raw:: html + + + + + + + + + + + + + + +

Parameter

Comments

+
+

Terms

+ +

+ list + / elements=dictionary + / required +

+ +
+

Something

+
+ + + + + + +.. Options + + +.. Attributes + + +.. Notes + + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Look up! + ansible.builtin.debug: + msg: "{{ lookup('ns2.col._bar', {}) }}" + + + + +.. Facts + + +.. Return values + +Return Value +------------ + +.. raw:: html + + + + + + + + + + + + + + +

Key

Description

+
+

Return value

+ +

+ list + / elements=dictionary +

+
+

The resulting stuff.

+

Returned: success

+
+ + + +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- Felix Fontein (@felixfontein) + + +.. hint:: + Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. + +.. Extra links + +Collection links +~~~~~~~~~~~~~~~~ + +.. raw:: html + + + +.. Parsing errors + diff --git a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo2_module.rst b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo2_module.rst index 03692935..c6de05fb 100644 --- a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo2_module.rst +++ b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo2_module.rst @@ -59,6 +59,7 @@ ns2.col.foo2 module -- Another foo .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_become.rst b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_become.rst index 9758235c..5794496a 100644 --- a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_become.rst +++ b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_become.rst @@ -59,6 +59,7 @@ ns2.col.foo become -- Use foo .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_cache.rst b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_cache.rst index 14d28d6b..54f29f0f 100644 --- a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_cache.rst +++ b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_cache.rst @@ -62,6 +62,7 @@ New in ns2.col 1.9.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_callback.rst b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_callback.rst index aca0781a..73eccc07 100644 --- a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_callback.rst +++ b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_callback.rst @@ -62,6 +62,7 @@ New in ns2.col 0.0.1 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_cliconf.rst b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_cliconf.rst index cc1b960c..6987ffc6 100644 --- a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_cliconf.rst +++ b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_cliconf.rst @@ -59,6 +59,7 @@ ns2.col.foo cliconf -- Foo router CLI config .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_connection.rst b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_connection.rst index cc159516..537a2c71 100644 --- a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_connection.rst +++ b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_connection.rst @@ -62,6 +62,7 @@ New in ns2.col 1.2.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_filter.rst b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_filter.rst index cfd028eb..e8062329 100644 --- a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_filter.rst +++ b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_filter.rst @@ -62,6 +62,7 @@ New in ns2.col 1.3.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_inventory.rst b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_inventory.rst index 05b86c02..4b7e190b 100644 --- a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_inventory.rst +++ b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_inventory.rst @@ -62,6 +62,7 @@ New in ns2.col 0.5.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_lookup.rst b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_lookup.rst index bac0c247..cf751047 100644 --- a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_lookup.rst +++ b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_lookup.rst @@ -62,6 +62,7 @@ New in ns2.col 1.0.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_module.rst b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_module.rst index 8a0f040f..9468853c 100644 --- a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_module.rst +++ b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_module.rst @@ -64,6 +64,7 @@ New in ns2.col 2.0.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_shell.rst b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_shell.rst index e582806e..82d2bc6d 100644 --- a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_shell.rst +++ b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_shell.rst @@ -62,6 +62,7 @@ New in ns2.col 1.0.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_strategy.rst b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_strategy.rst index 6dddc7de..c6a87fe0 100644 --- a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_strategy.rst +++ b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_strategy.rst @@ -62,6 +62,7 @@ New in ns2.col 1.1.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_test.rst b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_test.rst index 24a79c31..1111db19 100644 --- a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_test.rst +++ b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_test.rst @@ -59,6 +59,7 @@ ns2.col.foo test -- Is something a foo .. Deprecated + Synopsis -------- diff --git a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_vars.rst b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_vars.rst index 080ce90c..fcfd85cc 100644 --- a/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_vars.rst +++ b/tests/functional/baseline-use-html-blobs/collections/ns2/col/foo_vars.rst @@ -64,6 +64,7 @@ New in ns2.col 0.9.0 .. Deprecated + Synopsis -------- diff --git a/tests/functional/collections/ansible_collections/ns2/col/plugins/lookup/_bar.py b/tests/functional/collections/ansible_collections/ns2/col/plugins/lookup/_bar.py new file mode 100644 index 00000000..28c1ab89 --- /dev/null +++ b/tests/functional/collections/ansible_collections/ns2/col/plugins/lookup/_bar.py @@ -0,0 +1,43 @@ +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later +# SPDX-FileCopyrightText: Ansible Project + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +DOCUMENTATION = """ + name: _bar + author: Felix Fontein (@felixfontein) + version_added: "1.0.0" + short_description: Look up some bar + description: + - This one is private. + options: + _terms: + description: Something + required: true + type: list + elements: dict +""" + +EXAMPLES = """ +- name: Look up! + ansible.builtin.debug: + msg: "{{ lookup('ns2.col._bar', {}) }}" +""" + +RETURN = """ +_raw: + description: + - The resulting stuff. + type: list + elements: dict +""" + +from ansible.plugins.lookup import LookupBase + + +class LookupModule(LookupBase): + def run(self, terms, variables=None, **kwargs): + self.set_options(var_options=variables, direct=kwargs) + return terms