bug fix: using non-FQDN in plugin choices fails plugin name verification (#75991)

* enable both non-FQDN and FQDN plugin name
* add info about matching requirement of plugin name in config and plugin source file
pull/76174/head
Jonas I. Liechti 3 years ago committed by GitHub
parent 3a9e42cfde
commit 0b0acef423
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -30,6 +30,7 @@ If the plugin is in a collection, use the fully qualified name:
[inventory]
enable_plugins = namespace.collection_name.inventory_plugin_name
If you use a plugin that supports a YAML configuration source, make sure that the name matches the name provided in the ``plugin`` entry of the inventory source file.
.. _using_inventory:

@ -18,7 +18,7 @@ DOCUMENTATION = '''
plugin:
description: token that ensures this is a source file for the 'constructed' plugin.
required: True
choices: ['constructed']
choices: ['ansible.builtin.constructed', 'constructed']
use_vars_plugins:
description:
- Normally, for performance reasons, vars plugins get executed after the inventory sources complete the base inventory,
@ -36,7 +36,7 @@ DOCUMENTATION = '''
EXAMPLES = r'''
# inventory.config file in YAML format
plugin: constructed
plugin: ansible.builtin.constructed
strict: False
compose:
var_sum: var1 + var2

@ -17,7 +17,7 @@ DOCUMENTATION = '''
plugin:
description: token that ensures this is a source file for the 'generator' plugin.
required: True
choices: ['generator']
choices: ['ansible.builtin.generator', 'generator']
hosts:
description:
- The C(name) key is a template used to generate
@ -39,7 +39,7 @@ EXAMPLES = '''
# inventory.config file in YAML format
# remember to enable this inventory plugin in the ansible.cfg before using
# View the output using `ansible-inventory -i inventory.config --list`
plugin: generator
plugin: ansible.builtin.generator
hosts:
name: "{{ operation }}_{{ application }}_{{ environment }}_runner"
parents:

@ -1,3 +1,3 @@
plugin: constructed
plugin: ansible.builtin.constructed
groups:
webservers: inventory_hostname.startswith('web')

@ -1,4 +1,4 @@
plugin: constructed
plugin: ansible.builtin.constructed
strict: true
use_extra_vars: True
compose:

@ -1,4 +1,4 @@
plugin: constructed
plugin: ansible.builtin.constructed
keyed_groups:
- key: hostvar0
- key: hostvar1

@ -1,4 +1,4 @@
plugin: constructed
plugin: ansible.builtin.constructed
use_vars_plugins: true
keyed_groups:
- key: iamdefined

@ -1,4 +1,4 @@
plugin: constructed
plugin: ansible.builtin.constructed
keyed_groups:
- key: tags
prefix: tag

@ -1,5 +1,5 @@
plugin: constructed
plugin: ansible.builtin.constructed
keyed_groups:
- key: roles
default_value: storage
prefix: host
prefix: host

@ -1,5 +1,5 @@
plugin: constructed
plugin: ansible.builtin.constructed
keyed_groups:
- key: os
default_value: "fedora"
prefix: host
prefix: host

@ -1,4 +1,4 @@
plugin: constructed
plugin: ansible.builtin.constructed
keyed_groups:
- key: tags
prefix: tag

@ -1,4 +1,4 @@
plugin: constructed
plugin: ansible.builtin.constructed
keyed_groups:
- key: hostvar0
- key: hostvar1

Loading…
Cancel
Save