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:
|
||||
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.
|
||||
type: string
|
||||
required: true
|
||||
choices: [ 'cobbler', 'community.general.cobbler' ]
|
||||
url:
|
||||
description: URL to cobbler.
|
||||
type: string
|
||||
default: 'http://cobbler/cobbler_api'
|
||||
env:
|
||||
- name: COBBLER_SERVER
|
||||
user:
|
||||
description: Cobbler authentication user.
|
||||
type: string
|
||||
required: false
|
||||
env:
|
||||
- name: COBBLER_USER
|
||||
password:
|
||||
description: Cobbler authentication password.
|
||||
type: string
|
||||
required: false
|
||||
env:
|
||||
- name: COBBLER_PASSWORD
|
||||
|
|
|
@ -35,6 +35,7 @@ DOCUMENTATION = r'''
|
|||
version_added: 4.5.0
|
||||
plugin:
|
||||
description: Marks this as an instance of the 'linode' plugin.
|
||||
type: string
|
||||
required: true
|
||||
choices: ['linode', 'community.general.linode']
|
||||
ip_style:
|
||||
|
@ -47,6 +48,7 @@ DOCUMENTATION = r'''
|
|||
version_added: 3.6.0
|
||||
access_token:
|
||||
description: The Linode account personal access token.
|
||||
type: string
|
||||
required: true
|
||||
env:
|
||||
- name: LINODE_ACCESS_TOKEN
|
||||
|
|
|
@ -20,6 +20,7 @@ DOCUMENTATION = r'''
|
|||
options:
|
||||
plugin:
|
||||
description: Token that ensures this is a source file for the 'lxd' plugin.
|
||||
type: string
|
||||
required: true
|
||||
choices: [ 'community.general.lxd' ]
|
||||
url:
|
||||
|
@ -27,8 +28,8 @@ DOCUMENTATION = r'''
|
|||
- The unix domain socket path or the https URL for the lxd server.
|
||||
- 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).
|
||||
type: string
|
||||
default: unix:/var/snap/lxd/common/lxd/unix.socket
|
||||
type: str
|
||||
client_key:
|
||||
description:
|
||||
- The client certificate key file path.
|
||||
|
|
|
@ -20,6 +20,7 @@ DOCUMENTATION = '''
|
|||
options:
|
||||
plugin:
|
||||
description: token that ensures this is a source file for the 'nmap' plugin.
|
||||
type: string
|
||||
required: true
|
||||
choices: ['nmap', 'community.general.nmap']
|
||||
sudo:
|
||||
|
@ -29,6 +30,7 @@ DOCUMENTATION = '''
|
|||
type: boolean
|
||||
address:
|
||||
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
|
||||
env:
|
||||
- name: ANSIBLE_NMAP_ADDRESS
|
||||
|
@ -91,7 +93,7 @@ DOCUMENTATION = '''
|
|||
default: true
|
||||
version_added: 7.4.0
|
||||
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'
|
||||
'''
|
||||
EXAMPLES = '''
|
||||
|
|
|
@ -16,11 +16,13 @@ DOCUMENTATION = r'''
|
|||
options:
|
||||
plugin:
|
||||
description: token that ensures this is a source file for the 'online' plugin.
|
||||
type: string
|
||||
required: true
|
||||
choices: ['online', 'community.general.online']
|
||||
oauth_token:
|
||||
required: true
|
||||
description: Online OAuth token.
|
||||
type: string
|
||||
env:
|
||||
# in order of precedence
|
||||
- name: ONLINE_TOKEN
|
||||
|
|
|
@ -20,6 +20,7 @@ DOCUMENTATION = r'''
|
|||
plugin:
|
||||
description: Token that ensures this is a source file for the 'scaleway' plugin.
|
||||
required: true
|
||||
type: string
|
||||
choices: ['scaleway', 'community.general.scaleway']
|
||||
regions:
|
||||
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
|
||||
(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/).
|
||||
type: string
|
||||
env:
|
||||
# in order of precedence
|
||||
- name: SCW_TOKEN
|
||||
|
|
|
@ -24,6 +24,7 @@ DOCUMENTATION = '''
|
|||
description:
|
||||
- A token that ensures this is a source file for the plugin.
|
||||
required: true
|
||||
type: string
|
||||
choices: ['community.general.stackpath_compute']
|
||||
client_id:
|
||||
description:
|
||||
|
|
|
@ -22,6 +22,7 @@ DOCUMENTATION = '''
|
|||
options:
|
||||
plugin:
|
||||
description: token that ensures this is a source file for the 'virtualbox' plugin
|
||||
type: string
|
||||
required: true
|
||||
choices: ['virtualbox', 'community.general.virtualbox']
|
||||
running_only:
|
||||
|
@ -30,8 +31,10 @@ DOCUMENTATION = '''
|
|||
default: false
|
||||
settings_password_file:
|
||||
description: provide a file containing the settings password (equivalent to --settingspwfile)
|
||||
type: string
|
||||
network_info_path:
|
||||
description: property path to query for network information (ansible_host)
|
||||
type: string
|
||||
default: "/VirtualBox/GuestInfo/Net/0/V4/IP"
|
||||
query:
|
||||
description: create vars from virtualbox properties
|
||||
|
|
Loading…
Reference in a new issue