fix YAML docs in multiple plugins (#10286)

* fix YAML docs in multiple plugins

* pfexec: fix short description

* adjust callback plugins

* fix wsl connection

* fix filter plugins

* fix inventory plugins

* minor adjustments in diy, print_task, xen_orchestra
This commit is contained in:
Alexei Znamensky 2025-06-24 16:23:46 +12:00 committed by GitHub
commit e37cd1a015
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 98 additions and 117 deletions

View file

@ -104,15 +104,15 @@ options:
default: true
want_ip_addresses:
description:
- Toggle, if V(true) the plugin will add a C(cobbler_ipv4_addresses) and C(cobbler_ipv6_addresses) dictionary to the defined O(group) mapping
interface DNS names to IP addresses.
- Toggle, if V(true) the plugin will add a C(cobbler_ipv4_addresses) and C(cobbler_ipv6_addresses) dictionary to the
defined O(group) mapping interface DNS names to IP addresses.
type: boolean
default: true
version_added: 7.1.0
facts_level:
description:
- "Set to V(normal) to gather only system-level variables."
- "Set to V(as_rendered) to gather all variables as rolled up by Cobbler."
- Set to V(normal) to gather only system-level variables.
- Set to V(as_rendered) to gather all variables as rolled up by Cobbler.
type: string
choices: ['normal', 'as_rendered']
default: normal

View file

@ -11,7 +11,7 @@ DOCUMENTATION = r"""
name: gitlab_runners
author:
- Stefan Heitmüller (@morph027) <stefan.heitmueller@gmx.com>
short_description: Ansible dynamic inventory plugin for GitLab runners.
short_description: Ansible dynamic inventory plugin for GitLab runners
requirements:
- python-gitlab > 1.8.0
extends_documentation_fragment:
@ -44,14 +44,14 @@ options:
- private_token
- access_token
filter:
description: filter runners from GitLab API
description: Filter runners from GitLab API.
env:
- name: GITLAB_FILTER
version_added: 1.0.0
type: str
choices: ['active', 'paused', 'online', 'specific', 'shared']
verbose_output:
description: Toggle to (not) include all available nodes metadata
description: Toggle to (not) include all available nodes metadata.
type: bool
default: true
"""

View file

@ -14,8 +14,7 @@ author:
- Cliff Hults (@BongoEADGC6) <cliff.hults@gmail.com>
description:
- Get inventory hosts from the Icinga2 API.
- "Uses a configuration file as an inventory source, it must end in
C(.icinga2.yml) or C(.icinga2.yaml)."
- Uses a configuration file as an inventory source, it must end in C(.icinga2.yml) or C(.icinga2.yaml).
extends_documentation_fragment:
- constructed
options:
@ -46,7 +45,7 @@ options:
required: true
host_filter:
description:
- An Icinga2 API valid host filter. Leave blank for no filtering
- An Icinga2 API valid host filter. Leave blank for no filtering.
type: string
required: false
validate_certs:

View file

@ -8,29 +8,25 @@ from __future__ import annotations
DOCUMENTATION = r"""
name: iocage
short_description: iocage inventory source
short_description: C(iocage) inventory source
version_added: 10.2.0
author:
- Vladimir Botka (@vbotka)
requirements:
- iocage >= 1.8
description:
- Get inventory hosts from the iocage jail manager running on O(host).
- By default, O(host) is V(localhost). If O(host) is not V(localhost) it
is expected that the user running Ansible on the controller can
connect to the O(host) account O(user) with SSH non-interactively and
execute the command C(iocage list).
- Uses a configuration file as an inventory source, it must end
in C(.iocage.yml) or C(.iocage.yaml).
- Get inventory hosts from the C(iocage) jail manager running on O(host).
- By default, O(host) is V(localhost). If O(host) is not V(localhost) it is expected that the user running Ansible on the
controller can connect to the O(host) account O(user) with SSH non-interactively and execute the command C(iocage list).
- Uses a configuration file as an inventory source, it must end in C(.iocage.yml) or C(.iocage.yaml).
extends_documentation_fragment:
- ansible.builtin.constructed
- ansible.builtin.inventory_cache
options:
plugin:
description:
- The name of this plugin, it should always be set to
V(community.general.iocage) for this plugin to recognize
it as its own.
- The name of this plugin, it should always be set to V(community.general.iocage) for this plugin to recognize it as
its own.
required: true
choices: ['community.general.iocage']
type: str
@ -40,10 +36,8 @@ options:
default: localhost
user:
description:
- C(iocage) user.
It is expected that the O(user) is able to connect to the
O(host) with SSH and execute the command C(iocage list).
This option is not required if O(host) is V(localhost).
- C(iocage) user. It is expected that the O(user) is able to connect to the O(host) with SSH and execute the command
C(iocage list). This option is not required if O(host=localhost).
type: str
sudo:
description:
@ -61,8 +55,7 @@ options:
version_added: 10.3.0
get_properties:
description:
- Get jails' properties.
Creates dictionary C(iocage_properties) for each added host.
- Get jails' properties. Creates dictionary C(iocage_properties) for each added host.
type: bool
default: false
env:
@ -84,7 +77,7 @@ options:
description:
- The name of the tag in the C(iocage properties notes) that contains the jails alias.
- By default, the C(iocage list -l) column C(NAME) is used to name the jail.
- This option requires the notes format C("t1=v1 t2=v2 ...")
- This option requires the notes format C("t1=v1 t2=v2 ...").
- The option O(get_properties) must be enabled.
type: str
version_added: 11.0.0
@ -95,21 +88,16 @@ options:
default: false
version_added: 11.0.0
notes:
- You might want to test the command C(ssh user@host iocage list -l) on
the controller before using this inventory plugin with O(user) specified
and with O(host) other than V(localhost).
- If you run this inventory plugin on V(localhost) C(ssh) is not used.
In this case, test the command C(iocage list -l).
- You might want to test the command C(ssh user@host iocage list -l) on the controller before using this inventory plugin
with O(user) specified and with O(host) other than V(localhost).
- If you run this inventory plugin on V(localhost) C(ssh) is not used. In this case, test the command C(iocage list -l).
- This inventory plugin creates variables C(iocage_*) for each added host.
- The values of these variables are collected from the output of the
command C(iocage list -l).
- The values of these variables are collected from the output of the command C(iocage list -l).
- The names of these variables correspond to the output columns.
- The column C(NAME) is used to name the added host.
- The option O(hooks_results) expects the C(poolname) of a jail is mounted to
C(/poolname). For example, if you activate the pool C(iocage) this plugin
expects to find the O(hooks_results) items in the path
C(/iocage/iocage/jails/<name>/root). If you mount the C(poolname) to a
different path the easiest remedy is to create a symlink.
- The option O(hooks_results) expects the C(poolname) of a jail is mounted to C(/poolname). For example, if you activate
the pool C(iocage) this plugin expects to find the O(hooks_results) items in the path C(/iocage/iocage/jails/<name>/root).
If you mount the C(poolname) to a different path the easiest remedy is to create a symlink.
"""
EXAMPLES = r"""

View file

@ -9,15 +9,14 @@ DOCUMENTATION = r"""
name: linode
author:
- Luke Murphy (@decentral1se)
short_description: Ansible dynamic inventory plugin for Linode.
short_description: Ansible dynamic inventory plugin for Linode
requirements:
- linode_api4 >= 2.0.0
description:
- Reads inventories from the Linode API v4.
- Uses a YAML configuration file that ends with linode.(yml|yaml).
- Linode labels are used by default as the hostnames.
- The default inventory groups are built from groups (deprecated by
Linode) and not tags.
- The default inventory groups are built from groups (deprecated by Linode) and not tags.
extends_documentation_fragment:
- constructed
- inventory_cache

View file

@ -18,7 +18,7 @@ requirements:
- nmap CLI installed
options:
plugin:
description: token that ensures this is a source file for the 'nmap' plugin.
description: Token that ensures this is a source file for the P(community.general.nmap#inventory) plugin.
type: string
required: true
choices: ['nmap', 'community.general.nmap']
@ -46,8 +46,8 @@ options:
port:
description:
- Only scan specific port or port range (C(-p)).
- For example, you could pass V(22) for a single port, V(1-65535) for a range of ports,
or V(U:53,137,T:21-25,139,8080,S:9) to check port 53 with UDP, ports 21-25 with TCP, port 9 with SCTP, and ports 137, 139, and 8080 with all.
- For example, you could pass V(22) for a single port, V(1-65535) for a range of ports, or V(U:53,137,T:21-25,139,8080,S:9)
to check port 53 with UDP, ports 21-25 with TCP, port 9 with SCTP, and ports 137, 139, and 8080 with all.
type: string
version_added: 6.5.0
ports:
@ -55,11 +55,11 @@ options:
type: boolean
default: true
ipv4:
description: use IPv4 type addresses
description: Use IPv4 type addresses.
type: boolean
default: true
ipv6:
description: use IPv6 type addresses
description: Use IPv6 type addresses.
type: boolean
default: true
udp_scan:
@ -98,7 +98,7 @@ options:
version_added: 7.4.0
notes:
- At least one of O(ipv4) or O(ipv6) is required to be V(true); both can be V(true), but they cannot both be V(false).
- 'TODO: add OS fingerprinting'
- 'TODO: add OS fingerprinting.'
"""
EXAMPLES = r"""
---

View file

@ -14,7 +14,7 @@ description:
- Get inventory hosts from Scaleway (previously Online SAS or Online.net).
options:
plugin:
description: token that ensures this is a source file for the 'online' plugin.
description: Token that ensures this is a source file for the P(community.general.online#inventory) plugin.
type: string
required: true
choices: ['online', 'community.general.online']

View file

@ -16,8 +16,7 @@ extends_documentation_fragment:
- constructed
description:
- Get inventory hosts from OpenNebula cloud.
- Uses an YAML configuration file ending with either C(opennebula.yml) or C(opennebula.yaml)
to set parameter values.
- Uses an YAML configuration file ending with either C(opennebula.yml) or C(opennebula.yaml) to set parameter values.
- Uses O(api_authfile), C(~/.one/one_auth), or E(ONE_AUTH) pointing to a OpenNebula credentials file.
options:
plugin:
@ -28,8 +27,7 @@ options:
api_url:
description:
- URL of the OpenNebula RPC server.
- It is recommended to use HTTPS so that the username/password are not
transferred over the network unencrypted.
- It is recommended to use HTTPS so that the username/password are not transferred over the network unencrypted.
- If not set then the value of the E(ONE_URL) environment variable is used.
env:
- name: ONE_URL
@ -37,8 +35,8 @@ options:
type: string
api_username:
description:
- Name of the user to login into the OpenNebula RPC server. If not set
then the value of the E(ONE_USERNAME) environment variable is used.
- Name of the user to login into the OpenNebula RPC server. If not set then the value of the E(ONE_USERNAME) environment
variable is used.
env:
- name: ONE_USERNAME
type: string
@ -52,8 +50,8 @@ options:
type: string
api_authfile:
description:
- If both O(api_username) or O(api_password) are not set, then it will try
authenticate with ONE auth file. Default path is C(~/.one/one_auth).
- If both O(api_username) or O(api_password) are not set, then it will try authenticate with ONE auth file. Default
path is C(~/.one/one_auth).
- Set environment variable E(ONE_AUTH) to override this path.
env:
- name: ONE_AUTH
@ -71,7 +69,7 @@ options:
description: Only return servers filtered by this label.
type: string
group_by_labels:
description: Create host groups by vm labels
description: Create host groups by VM labels.
type: bool
default: true
"""

View file

@ -37,7 +37,8 @@ options:
scw_profile:
description:
- The config profile to use in config file.
- By default uses the one specified as C(active_profile) in the config file, or falls back to V(default) if that is not defined.
- By default uses the one specified as C(active_profile) in the config file, or falls back to V(default) if that is
not defined.
type: string
version_added: 4.4.0
oauth_token:
@ -65,10 +66,8 @@ options:
- hostname
- id
variables:
description: 'Set individual variables: keys are variable names and
values are templates. Any value returned by the
L(Scaleway API, https://developer.scaleway.com/#servers-server-get)
can be used.'
description: 'Set individual variables: keys are variable names and values are templates. Any value returned by the L(Scaleway
API, https://developer.scaleway.com/#servers-server-get) can be used.'
type: dict
"""

View file

@ -8,47 +8,48 @@ from __future__ import annotations
DOCUMENTATION = r"""
author: Unknown (!UNKNOWN)
name: virtualbox
short_description: virtualbox inventory source
short_description: Virtualbox inventory source
description:
- Get inventory hosts from the local virtualbox installation.
- Uses a YAML configuration file that ends with virtualbox.(yml|yaml) or vbox.(yml|yaml).
- The inventory_hostname is always the 'Name' of the virtualbox instance.
- Groups can be assigned to the VMs using C(VBoxManage). Multiple groups can be assigned by using V(/) as a delimeter.
- A separate parameter, O(enable_advanced_group_parsing) is exposed to change grouping behaviour. See the parameter documentation for details.
- A separate parameter, O(enable_advanced_group_parsing) is exposed to change grouping behaviour. See the parameter documentation
for details.
extends_documentation_fragment:
- constructed
- inventory_cache
options:
plugin:
description: token that ensures this is a source file for the 'virtualbox' plugin
description: Token that ensures this is a source file for the P(community.general.virtualbox#inventory) plugin.
type: string
required: true
choices: ['virtualbox', 'community.general.virtualbox']
running_only:
description: toggles showing all vms vs only those currently running
description: Toggles showing all VMs instead of only those currently running.
type: boolean
default: false
settings_password_file:
description: provide a file containing the settings password (equivalent to --settingspwfile)
description: Provide a file containing the settings password (equivalent to C(--settingspwfile)).
type: string
network_info_path:
description: property path to query for network information (ansible_host)
description: Property path to query for network information (C(ansible_host)).
type: string
default: "/VirtualBox/GuestInfo/Net/0/V4/IP"
query:
description: create vars from virtualbox properties
description: Create vars from virtualbox properties.
type: dictionary
default: {}
enable_advanced_group_parsing:
description:
- The default group parsing rule (when this setting is set to V(false)) is to split the VirtualBox VM's group based on the V(/) character and
assign the resulting list elements as an Ansible Group.
- Setting O(enable_advanced_group_parsing=true) changes this behaviour to match VirtualBox's interpretation of groups according to
U(https://www.virtualbox.org/manual/UserManual.html#gui-vmgroups).
Groups are now split using the V(,) character, and the V(/) character indicates nested groups.
- When enabled, a VM that's been configured using V(VBoxManage modifyvm "vm01" --groups "/TestGroup/TestGroup2,/TestGroup3") will result in
the group C(TestGroup2) being a child group of C(TestGroup); and
the VM being a part of C(TestGroup2) and C(TestGroup3).
- The default group parsing rule (when this setting is set to V(false)) is to split the VirtualBox VM's group based
on the V(/) character and assign the resulting list elements as an Ansible Group.
- Setting O(enable_advanced_group_parsing=true) changes this behaviour to match VirtualBox's interpretation of groups
according to U(https://www.virtualbox.org/manual/UserManual.html#gui-vmgroups). Groups are now split using the V(,)
character, and the V(/) character indicates nested groups.
- When enabled, a VM that's been configured using V(VBoxManage modifyvm "vm01" --groups "/TestGroup/TestGroup2,/TestGroup3")
will result in the group C(TestGroup2) being a child group of C(TestGroup); and the VM being a part of C(TestGroup2)
and C(TestGroup3).
default: false
type: bool
version_added: 9.2.0