mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Type options of inventory plugins (#8625)
Type options of inventory plugins.
This commit is contained in:
parent
daed4dcc94
commit
f9a56b9a9b
9 changed files with 21 additions and 2 deletions
2
changelogs/fragments/8625-inventory-types.yml
Normal file
2
changelogs/fragments/8625-inventory-types.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
minor_changes:
|
||||||
|
- "cobbler, linode, lxd, nmap, online, scaleway, stackpath_compute, virtualbox inventory plugins - make sure that all options are typed (https://github.com/ansible-collections/community.general/pull/8625)."
|
|
@ -21,20 +21,24 @@ DOCUMENTATION = '''
|
||||||
options:
|
options:
|
||||||
plugin:
|
plugin:
|
||||||
description: The name of this plugin, it should always be set to V(community.general.cobbler) for this plugin to recognize it as it's own.
|
description: The name of this plugin, it should always be set to V(community.general.cobbler) for this plugin to recognize it as it's own.
|
||||||
|
type: string
|
||||||
required: true
|
required: true
|
||||||
choices: [ 'cobbler', 'community.general.cobbler' ]
|
choices: [ 'cobbler', 'community.general.cobbler' ]
|
||||||
url:
|
url:
|
||||||
description: URL to cobbler.
|
description: URL to cobbler.
|
||||||
|
type: string
|
||||||
default: 'http://cobbler/cobbler_api'
|
default: 'http://cobbler/cobbler_api'
|
||||||
env:
|
env:
|
||||||
- name: COBBLER_SERVER
|
- name: COBBLER_SERVER
|
||||||
user:
|
user:
|
||||||
description: Cobbler authentication user.
|
description: Cobbler authentication user.
|
||||||
|
type: string
|
||||||
required: false
|
required: false
|
||||||
env:
|
env:
|
||||||
- name: COBBLER_USER
|
- name: COBBLER_USER
|
||||||
password:
|
password:
|
||||||
description: Cobbler authentication password.
|
description: Cobbler authentication password.
|
||||||
|
type: string
|
||||||
required: false
|
required: false
|
||||||
env:
|
env:
|
||||||
- name: COBBLER_PASSWORD
|
- name: COBBLER_PASSWORD
|
||||||
|
|
|
@ -35,6 +35,7 @@ DOCUMENTATION = r'''
|
||||||
version_added: 4.5.0
|
version_added: 4.5.0
|
||||||
plugin:
|
plugin:
|
||||||
description: Marks this as an instance of the 'linode' plugin.
|
description: Marks this as an instance of the 'linode' plugin.
|
||||||
|
type: string
|
||||||
required: true
|
required: true
|
||||||
choices: ['linode', 'community.general.linode']
|
choices: ['linode', 'community.general.linode']
|
||||||
ip_style:
|
ip_style:
|
||||||
|
@ -47,6 +48,7 @@ DOCUMENTATION = r'''
|
||||||
version_added: 3.6.0
|
version_added: 3.6.0
|
||||||
access_token:
|
access_token:
|
||||||
description: The Linode account personal access token.
|
description: The Linode account personal access token.
|
||||||
|
type: string
|
||||||
required: true
|
required: true
|
||||||
env:
|
env:
|
||||||
- name: LINODE_ACCESS_TOKEN
|
- name: LINODE_ACCESS_TOKEN
|
||||||
|
|
|
@ -20,6 +20,7 @@ DOCUMENTATION = r'''
|
||||||
options:
|
options:
|
||||||
plugin:
|
plugin:
|
||||||
description: Token that ensures this is a source file for the 'lxd' plugin.
|
description: Token that ensures this is a source file for the 'lxd' plugin.
|
||||||
|
type: string
|
||||||
required: true
|
required: true
|
||||||
choices: [ 'community.general.lxd' ]
|
choices: [ 'community.general.lxd' ]
|
||||||
url:
|
url:
|
||||||
|
@ -27,8 +28,8 @@ DOCUMENTATION = r'''
|
||||||
- The unix domain socket path or the https URL for the lxd server.
|
- The unix domain socket path or the https URL for the lxd server.
|
||||||
- Sockets in filesystem have to start with C(unix:).
|
- Sockets in filesystem have to start with C(unix:).
|
||||||
- Mostly C(unix:/var/lib/lxd/unix.socket) or C(unix:/var/snap/lxd/common/lxd/unix.socket).
|
- Mostly C(unix:/var/lib/lxd/unix.socket) or C(unix:/var/snap/lxd/common/lxd/unix.socket).
|
||||||
|
type: string
|
||||||
default: unix:/var/snap/lxd/common/lxd/unix.socket
|
default: unix:/var/snap/lxd/common/lxd/unix.socket
|
||||||
type: str
|
|
||||||
client_key:
|
client_key:
|
||||||
description:
|
description:
|
||||||
- The client certificate key file path.
|
- The client certificate key file path.
|
||||||
|
|
|
@ -20,6 +20,7 @@ DOCUMENTATION = '''
|
||||||
options:
|
options:
|
||||||
plugin:
|
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 'nmap' plugin.
|
||||||
|
type: string
|
||||||
required: true
|
required: true
|
||||||
choices: ['nmap', 'community.general.nmap']
|
choices: ['nmap', 'community.general.nmap']
|
||||||
sudo:
|
sudo:
|
||||||
|
@ -29,6 +30,7 @@ DOCUMENTATION = '''
|
||||||
type: boolean
|
type: boolean
|
||||||
address:
|
address:
|
||||||
description: Network IP or range of IPs to scan, you can use a simple range (10.2.2.15-25) or CIDR notation.
|
description: Network IP or range of IPs to scan, you can use a simple range (10.2.2.15-25) or CIDR notation.
|
||||||
|
type: string
|
||||||
required: true
|
required: true
|
||||||
env:
|
env:
|
||||||
- name: ANSIBLE_NMAP_ADDRESS
|
- name: ANSIBLE_NMAP_ADDRESS
|
||||||
|
@ -91,7 +93,7 @@ DOCUMENTATION = '''
|
||||||
default: true
|
default: true
|
||||||
version_added: 7.4.0
|
version_added: 7.4.0
|
||||||
notes:
|
notes:
|
||||||
- At least one of ipv4 or ipv6 is required to be True, both can be True, but they cannot both be False.
|
- 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 = '''
|
EXAMPLES = '''
|
||||||
|
|
|
@ -16,11 +16,13 @@ DOCUMENTATION = r'''
|
||||||
options:
|
options:
|
||||||
plugin:
|
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 'online' plugin.
|
||||||
|
type: string
|
||||||
required: true
|
required: true
|
||||||
choices: ['online', 'community.general.online']
|
choices: ['online', 'community.general.online']
|
||||||
oauth_token:
|
oauth_token:
|
||||||
required: true
|
required: true
|
||||||
description: Online OAuth token.
|
description: Online OAuth token.
|
||||||
|
type: string
|
||||||
env:
|
env:
|
||||||
# in order of precedence
|
# in order of precedence
|
||||||
- name: ONLINE_TOKEN
|
- name: ONLINE_TOKEN
|
||||||
|
|
|
@ -20,6 +20,7 @@ DOCUMENTATION = r'''
|
||||||
plugin:
|
plugin:
|
||||||
description: Token that ensures this is a source file for the 'scaleway' plugin.
|
description: Token that ensures this is a source file for the 'scaleway' plugin.
|
||||||
required: true
|
required: true
|
||||||
|
type: string
|
||||||
choices: ['scaleway', 'community.general.scaleway']
|
choices: ['scaleway', 'community.general.scaleway']
|
||||||
regions:
|
regions:
|
||||||
description: Filter results on a specific Scaleway region.
|
description: Filter results on a specific Scaleway region.
|
||||||
|
@ -46,6 +47,7 @@ DOCUMENTATION = r'''
|
||||||
- If not explicitly defined or in environment variables, it will try to lookup in the scaleway-cli configuration file
|
- If not explicitly defined or in environment variables, it will try to lookup in the scaleway-cli configuration file
|
||||||
(C($SCW_CONFIG_PATH), C($XDG_CONFIG_HOME/scw/config.yaml), or C(~/.config/scw/config.yaml)).
|
(C($SCW_CONFIG_PATH), C($XDG_CONFIG_HOME/scw/config.yaml), or C(~/.config/scw/config.yaml)).
|
||||||
- More details on L(how to generate token, https://www.scaleway.com/en/docs/generate-api-keys/).
|
- More details on L(how to generate token, https://www.scaleway.com/en/docs/generate-api-keys/).
|
||||||
|
type: string
|
||||||
env:
|
env:
|
||||||
# in order of precedence
|
# in order of precedence
|
||||||
- name: SCW_TOKEN
|
- name: SCW_TOKEN
|
||||||
|
|
|
@ -24,6 +24,7 @@ DOCUMENTATION = '''
|
||||||
description:
|
description:
|
||||||
- A token that ensures this is a source file for the plugin.
|
- A token that ensures this is a source file for the plugin.
|
||||||
required: true
|
required: true
|
||||||
|
type: string
|
||||||
choices: ['community.general.stackpath_compute']
|
choices: ['community.general.stackpath_compute']
|
||||||
client_id:
|
client_id:
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -22,6 +22,7 @@ DOCUMENTATION = '''
|
||||||
options:
|
options:
|
||||||
plugin:
|
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 'virtualbox' plugin
|
||||||
|
type: string
|
||||||
required: true
|
required: true
|
||||||
choices: ['virtualbox', 'community.general.virtualbox']
|
choices: ['virtualbox', 'community.general.virtualbox']
|
||||||
running_only:
|
running_only:
|
||||||
|
@ -30,8 +31,10 @@ DOCUMENTATION = '''
|
||||||
default: false
|
default: false
|
||||||
settings_password_file:
|
settings_password_file:
|
||||||
description: provide a file containing the settings password (equivalent to --settingspwfile)
|
description: provide a file containing the settings password (equivalent to --settingspwfile)
|
||||||
|
type: string
|
||||||
network_info_path:
|
network_info_path:
|
||||||
description: property path to query for network information (ansible_host)
|
description: property path to query for network information (ansible_host)
|
||||||
|
type: string
|
||||||
default: "/VirtualBox/GuestInfo/Net/0/V4/IP"
|
default: "/VirtualBox/GuestInfo/Net/0/V4/IP"
|
||||||
query:
|
query:
|
||||||
description: create vars from virtualbox properties
|
description: create vars from virtualbox properties
|
||||||
|
|
Loading…
Reference in a new issue