mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
[PR #8626/daed4dcc backport][stable-9] Type options of lookup plugins (#8660)
Type options of lookup plugins (#8626)
Type options of lookup plugins.
(cherry picked from commit daed4dcc94
)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
037948fde9
commit
3726b50a92
15 changed files with 55 additions and 6 deletions
2
changelogs/fragments/8626-lookup-types.yml
Normal file
2
changelogs/fragments/8626-lookup-types.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
minor_changes:
|
||||||
|
- "chef_databag, consul_kv, cyberarkpassword, dsv, etcd, filetree, hiera, onepassword, onepassword_doc, onepassword_raw, passwordstore, redis, shelvefile, tss lookup plugins - make sure that all options are typed (https://github.com/ansible-collections/community.general/pull/8626)."
|
|
@ -22,10 +22,12 @@ DOCUMENTATION = '''
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- Name of the databag
|
- Name of the databag
|
||||||
|
type: string
|
||||||
required: true
|
required: true
|
||||||
item:
|
item:
|
||||||
description:
|
description:
|
||||||
- Item to fetch
|
- Item to fetch
|
||||||
|
type: string
|
||||||
required: true
|
required: true
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
|
@ -29,13 +29,17 @@ DOCUMENTATION = '''
|
||||||
index:
|
index:
|
||||||
description:
|
description:
|
||||||
- If the key has a value with the specified index then this is returned allowing access to historical values.
|
- If the key has a value with the specified index then this is returned allowing access to historical values.
|
||||||
|
type: int
|
||||||
datacenter:
|
datacenter:
|
||||||
description:
|
description:
|
||||||
- Retrieve the key from a consul datacenter other than the default for the consul host.
|
- Retrieve the key from a consul datacenter other than the default for the consul host.
|
||||||
|
type: str
|
||||||
token:
|
token:
|
||||||
description: The acl token to allow access to restricted values.
|
description: The acl token to allow access to restricted values.
|
||||||
|
type: str
|
||||||
host:
|
host:
|
||||||
default: localhost
|
default: localhost
|
||||||
|
type: str
|
||||||
description:
|
description:
|
||||||
- The target to connect to, must be a resolvable address.
|
- The target to connect to, must be a resolvable address.
|
||||||
- Will be determined from E(ANSIBLE_CONSUL_URL) if that is set.
|
- Will be determined from E(ANSIBLE_CONSUL_URL) if that is set.
|
||||||
|
@ -46,22 +50,26 @@ DOCUMENTATION = '''
|
||||||
description:
|
description:
|
||||||
- The port of the target host to connect to.
|
- The port of the target host to connect to.
|
||||||
- If you use E(ANSIBLE_CONSUL_URL) this value will be used from there.
|
- If you use E(ANSIBLE_CONSUL_URL) this value will be used from there.
|
||||||
|
type: int
|
||||||
default: 8500
|
default: 8500
|
||||||
scheme:
|
scheme:
|
||||||
default: http
|
default: http
|
||||||
|
type: str
|
||||||
description:
|
description:
|
||||||
- Whether to use http or https.
|
- Whether to use http or https.
|
||||||
- If you use E(ANSIBLE_CONSUL_URL) this value will be used from there.
|
- If you use E(ANSIBLE_CONSUL_URL) this value will be used from there.
|
||||||
validate_certs:
|
validate_certs:
|
||||||
default: true
|
default: true
|
||||||
description: Whether to verify the ssl connection or not.
|
description: Whether to verify the TLS connection or not.
|
||||||
|
type: bool
|
||||||
env:
|
env:
|
||||||
- name: ANSIBLE_CONSUL_VALIDATE_CERTS
|
- name: ANSIBLE_CONSUL_VALIDATE_CERTS
|
||||||
ini:
|
ini:
|
||||||
- section: lookup_consul
|
- section: lookup_consul
|
||||||
key: validate_certs
|
key: validate_certs
|
||||||
client_cert:
|
client_cert:
|
||||||
description: The client cert to verify the ssl connection.
|
description: The client cert to verify the TLS connection.
|
||||||
|
type: str
|
||||||
env:
|
env:
|
||||||
- name: ANSIBLE_CONSUL_CLIENT_CERT
|
- name: ANSIBLE_CONSUL_CLIENT_CERT
|
||||||
ini:
|
ini:
|
||||||
|
@ -94,7 +102,7 @@ EXAMPLES = """
|
||||||
|
|
||||||
- name: retrieving a KV from a remote cluster on non default port
|
- name: retrieving a KV from a remote cluster on non default port
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "{{ lookup('community.general.consul_kv', 'my/key', host='10.10.10.10', port='2000') }}"
|
msg: "{{ lookup('community.general.consul_kv', 'my/key', host='10.10.10.10', port=2000) }}"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
RETURN = """
|
RETURN = """
|
||||||
|
|
|
@ -17,19 +17,23 @@ DOCUMENTATION = '''
|
||||||
options :
|
options :
|
||||||
_command:
|
_command:
|
||||||
description: Cyberark CLI utility.
|
description: Cyberark CLI utility.
|
||||||
|
type: string
|
||||||
env:
|
env:
|
||||||
- name: AIM_CLIPASSWORDSDK_CMD
|
- name: AIM_CLIPASSWORDSDK_CMD
|
||||||
default: '/opt/CARKaim/sdk/clipasswordsdk'
|
default: '/opt/CARKaim/sdk/clipasswordsdk'
|
||||||
appid:
|
appid:
|
||||||
description: Defines the unique ID of the application that is issuing the password request.
|
description: Defines the unique ID of the application that is issuing the password request.
|
||||||
|
type: string
|
||||||
required: true
|
required: true
|
||||||
query:
|
query:
|
||||||
description: Describes the filter criteria for the password retrieval.
|
description: Describes the filter criteria for the password retrieval.
|
||||||
|
type: string
|
||||||
required: true
|
required: true
|
||||||
output:
|
output:
|
||||||
description:
|
description:
|
||||||
- Specifies the desired output fields separated by commas.
|
- Specifies the desired output fields separated by commas.
|
||||||
- "They could be: Password, PassProps.<property>, PasswordChangeInProcess"
|
- "They could be: Password, PassProps.<property>, PasswordChangeInProcess"
|
||||||
|
type: string
|
||||||
default: 'password'
|
default: 'password'
|
||||||
_extra:
|
_extra:
|
||||||
description: for extra_params values please check parameters for clipasswordsdk in CyberArk's "Credential Provider and ASCP Implementation Guide"
|
description: for extra_params values please check parameters for clipasswordsdk in CyberArk's "Credential Provider and ASCP Implementation Guide"
|
||||||
|
|
|
@ -22,6 +22,7 @@ options:
|
||||||
required: true
|
required: true
|
||||||
tenant:
|
tenant:
|
||||||
description: The first format parameter in the default O(url_template).
|
description: The first format parameter in the default O(url_template).
|
||||||
|
type: string
|
||||||
env:
|
env:
|
||||||
- name: DSV_TENANT
|
- name: DSV_TENANT
|
||||||
ini:
|
ini:
|
||||||
|
@ -32,6 +33,7 @@ options:
|
||||||
default: com
|
default: com
|
||||||
description: The top-level domain of the tenant; the second format
|
description: The top-level domain of the tenant; the second format
|
||||||
parameter in the default O(url_template).
|
parameter in the default O(url_template).
|
||||||
|
type: string
|
||||||
env:
|
env:
|
||||||
- name: DSV_TLD
|
- name: DSV_TLD
|
||||||
ini:
|
ini:
|
||||||
|
@ -40,6 +42,7 @@ options:
|
||||||
required: false
|
required: false
|
||||||
client_id:
|
client_id:
|
||||||
description: The client_id with which to request the Access Grant.
|
description: The client_id with which to request the Access Grant.
|
||||||
|
type: string
|
||||||
env:
|
env:
|
||||||
- name: DSV_CLIENT_ID
|
- name: DSV_CLIENT_ID
|
||||||
ini:
|
ini:
|
||||||
|
@ -48,6 +51,7 @@ options:
|
||||||
required: true
|
required: true
|
||||||
client_secret:
|
client_secret:
|
||||||
description: The client secret associated with the specific O(client_id).
|
description: The client secret associated with the specific O(client_id).
|
||||||
|
type: string
|
||||||
env:
|
env:
|
||||||
- name: DSV_CLIENT_SECRET
|
- name: DSV_CLIENT_SECRET
|
||||||
ini:
|
ini:
|
||||||
|
@ -58,6 +62,7 @@ options:
|
||||||
default: https://{}.secretsvaultcloud.{}/v1
|
default: https://{}.secretsvaultcloud.{}/v1
|
||||||
description: The path to prepend to the base URL to form a valid REST
|
description: The path to prepend to the base URL to form a valid REST
|
||||||
API request.
|
API request.
|
||||||
|
type: string
|
||||||
env:
|
env:
|
||||||
- name: DSV_URL_TEMPLATE
|
- name: DSV_URL_TEMPLATE
|
||||||
ini:
|
ini:
|
||||||
|
|
|
@ -25,12 +25,14 @@ DOCUMENTATION = '''
|
||||||
url:
|
url:
|
||||||
description:
|
description:
|
||||||
- Environment variable with the URL for the etcd server
|
- Environment variable with the URL for the etcd server
|
||||||
|
type: string
|
||||||
default: 'http://127.0.0.1:4001'
|
default: 'http://127.0.0.1:4001'
|
||||||
env:
|
env:
|
||||||
- name: ANSIBLE_ETCD_URL
|
- name: ANSIBLE_ETCD_URL
|
||||||
version:
|
version:
|
||||||
description:
|
description:
|
||||||
- Environment variable with the etcd protocol version
|
- Environment variable with the etcd protocol version
|
||||||
|
type: string
|
||||||
default: 'v1'
|
default: 'v1'
|
||||||
env:
|
env:
|
||||||
- name: ANSIBLE_ETCD_VERSION
|
- name: ANSIBLE_ETCD_VERSION
|
||||||
|
|
|
@ -17,8 +17,10 @@ description:
|
||||||
This enables merging different trees in order of importance, or add role_vars to specific paths to influence different instances of the same role.
|
This enables merging different trees in order of importance, or add role_vars to specific paths to influence different instances of the same role.
|
||||||
options:
|
options:
|
||||||
_terms:
|
_terms:
|
||||||
description: path(s) of files to read
|
description: Path(s) of files to read.
|
||||||
required: true
|
required: true
|
||||||
|
type: list
|
||||||
|
elements: string
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = r"""
|
EXAMPLES = r"""
|
||||||
|
|
|
@ -25,12 +25,14 @@ DOCUMENTATION = '''
|
||||||
executable:
|
executable:
|
||||||
description:
|
description:
|
||||||
- Binary file to execute Hiera.
|
- Binary file to execute Hiera.
|
||||||
|
type: string
|
||||||
default: '/usr/bin/hiera'
|
default: '/usr/bin/hiera'
|
||||||
env:
|
env:
|
||||||
- name: ANSIBLE_HIERA_BIN
|
- name: ANSIBLE_HIERA_BIN
|
||||||
config_file:
|
config_file:
|
||||||
description:
|
description:
|
||||||
- File that describes the hierarchy of Hiera.
|
- File that describes the hierarchy of Hiera.
|
||||||
|
type: string
|
||||||
default: '/etc/hiera.yaml'
|
default: '/etc/hiera.yaml'
|
||||||
env:
|
env:
|
||||||
- name: ANSIBLE_HIERA_CFG
|
- name: ANSIBLE_HIERA_CFG
|
||||||
|
|
|
@ -23,6 +23,8 @@ DOCUMENTATION = '''
|
||||||
_terms:
|
_terms:
|
||||||
description: Identifier(s) (case-insensitive UUID or name) of item(s) to retrieve.
|
description: Identifier(s) (case-insensitive UUID or name) of item(s) to retrieve.
|
||||||
required: true
|
required: true
|
||||||
|
type: list
|
||||||
|
elements: string
|
||||||
account_id:
|
account_id:
|
||||||
version_added: 7.5.0
|
version_added: 7.5.0
|
||||||
domain:
|
domain:
|
||||||
|
|
|
@ -24,6 +24,8 @@ DOCUMENTATION = '''
|
||||||
_terms:
|
_terms:
|
||||||
description: Identifier(s) (case-insensitive UUID or name) of item(s) to retrieve.
|
description: Identifier(s) (case-insensitive UUID or name) of item(s) to retrieve.
|
||||||
required: true
|
required: true
|
||||||
|
type: list
|
||||||
|
elements: string
|
||||||
|
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.general.onepassword
|
- community.general.onepassword
|
||||||
|
|
|
@ -23,6 +23,8 @@ DOCUMENTATION = '''
|
||||||
_terms:
|
_terms:
|
||||||
description: Identifier(s) (case-insensitive UUID or name) of item(s) to retrieve.
|
description: Identifier(s) (case-insensitive UUID or name) of item(s) to retrieve.
|
||||||
required: true
|
required: true
|
||||||
|
type: list
|
||||||
|
elements: string
|
||||||
account_id:
|
account_id:
|
||||||
version_added: 7.5.0
|
version_added: 7.5.0
|
||||||
domain:
|
domain:
|
||||||
|
|
|
@ -42,8 +42,9 @@ DOCUMENTATION = '''
|
||||||
default: false
|
default: false
|
||||||
umask:
|
umask:
|
||||||
description:
|
description:
|
||||||
- Sets the umask for the created .gpg files. The first octed must be greater than 3 (user readable).
|
- Sets the umask for the created V(.gpg) files. The first octed must be greater than 3 (user readable).
|
||||||
- Note pass' default value is V('077').
|
- Note pass' default value is V('077').
|
||||||
|
type: string
|
||||||
env:
|
env:
|
||||||
- name: PASSWORD_STORE_UMASK
|
- name: PASSWORD_STORE_UMASK
|
||||||
version_added: 1.3.0
|
version_added: 1.3.0
|
||||||
|
|
|
@ -19,8 +19,11 @@ DOCUMENTATION = '''
|
||||||
options:
|
options:
|
||||||
_terms:
|
_terms:
|
||||||
description: list of keys to query
|
description: list of keys to query
|
||||||
|
type: list
|
||||||
|
elements: string
|
||||||
host:
|
host:
|
||||||
description: location of Redis host
|
description: location of Redis host
|
||||||
|
type: string
|
||||||
default: '127.0.0.1'
|
default: '127.0.0.1'
|
||||||
env:
|
env:
|
||||||
- name: ANSIBLE_REDIS_HOST
|
- name: ANSIBLE_REDIS_HOST
|
||||||
|
|
|
@ -15,11 +15,15 @@ DOCUMENTATION = '''
|
||||||
options:
|
options:
|
||||||
_terms:
|
_terms:
|
||||||
description: Sets of key value pairs of parameters.
|
description: Sets of key value pairs of parameters.
|
||||||
|
type: list
|
||||||
|
elements: str
|
||||||
key:
|
key:
|
||||||
description: Key to query.
|
description: Key to query.
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
file:
|
file:
|
||||||
description: Path to shelve file.
|
description: Path to shelve file.
|
||||||
|
type: path
|
||||||
required: true
|
required: true
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,8 @@ options:
|
||||||
_terms:
|
_terms:
|
||||||
description: The integer ID of the secret.
|
description: The integer ID of the secret.
|
||||||
required: true
|
required: true
|
||||||
type: int
|
type: list
|
||||||
|
elements: int
|
||||||
secret_path:
|
secret_path:
|
||||||
description: Indicate a full path of secret including folder and secret name when the secret ID is set to 0.
|
description: Indicate a full path of secret including folder and secret name when the secret ID is set to 0.
|
||||||
required: false
|
required: false
|
||||||
|
@ -52,6 +53,7 @@ options:
|
||||||
version_added: 7.0.0
|
version_added: 7.0.0
|
||||||
base_url:
|
base_url:
|
||||||
description: The base URL of the server, for example V(https://localhost/SecretServer).
|
description: The base URL of the server, for example V(https://localhost/SecretServer).
|
||||||
|
type: string
|
||||||
env:
|
env:
|
||||||
- name: TSS_BASE_URL
|
- name: TSS_BASE_URL
|
||||||
ini:
|
ini:
|
||||||
|
@ -60,6 +62,7 @@ options:
|
||||||
required: true
|
required: true
|
||||||
username:
|
username:
|
||||||
description: The username with which to request the OAuth2 Access Grant.
|
description: The username with which to request the OAuth2 Access Grant.
|
||||||
|
type: string
|
||||||
env:
|
env:
|
||||||
- name: TSS_USERNAME
|
- name: TSS_USERNAME
|
||||||
ini:
|
ini:
|
||||||
|
@ -69,6 +72,7 @@ options:
|
||||||
description:
|
description:
|
||||||
- The password associated with the supplied username.
|
- The password associated with the supplied username.
|
||||||
- Required when O(token) is not provided.
|
- Required when O(token) is not provided.
|
||||||
|
type: string
|
||||||
env:
|
env:
|
||||||
- name: TSS_PASSWORD
|
- name: TSS_PASSWORD
|
||||||
ini:
|
ini:
|
||||||
|
@ -80,6 +84,7 @@ options:
|
||||||
- The domain with which to request the OAuth2 Access Grant.
|
- The domain with which to request the OAuth2 Access Grant.
|
||||||
- Optional when O(token) is not provided.
|
- Optional when O(token) is not provided.
|
||||||
- Requires C(python-tss-sdk) version 1.0.0 or greater.
|
- Requires C(python-tss-sdk) version 1.0.0 or greater.
|
||||||
|
type: string
|
||||||
env:
|
env:
|
||||||
- name: TSS_DOMAIN
|
- name: TSS_DOMAIN
|
||||||
ini:
|
ini:
|
||||||
|
@ -92,6 +97,7 @@ options:
|
||||||
- Existing token for Thycotic authorizer.
|
- Existing token for Thycotic authorizer.
|
||||||
- If provided, O(username) and O(password) are not needed.
|
- If provided, O(username) and O(password) are not needed.
|
||||||
- Requires C(python-tss-sdk) version 1.0.0 or greater.
|
- Requires C(python-tss-sdk) version 1.0.0 or greater.
|
||||||
|
type: string
|
||||||
env:
|
env:
|
||||||
- name: TSS_TOKEN
|
- name: TSS_TOKEN
|
||||||
ini:
|
ini:
|
||||||
|
@ -102,6 +108,7 @@ options:
|
||||||
default: /api/v1
|
default: /api/v1
|
||||||
description: The path to append to the base URL to form a valid REST
|
description: The path to append to the base URL to form a valid REST
|
||||||
API request.
|
API request.
|
||||||
|
type: string
|
||||||
env:
|
env:
|
||||||
- name: TSS_API_PATH_URI
|
- name: TSS_API_PATH_URI
|
||||||
required: false
|
required: false
|
||||||
|
@ -109,6 +116,7 @@ options:
|
||||||
default: /oauth2/token
|
default: /oauth2/token
|
||||||
description: The path to append to the base URL to form a valid OAuth2
|
description: The path to append to the base URL to form a valid OAuth2
|
||||||
Access Grant request.
|
Access Grant request.
|
||||||
|
type: string
|
||||||
env:
|
env:
|
||||||
- name: TSS_TOKEN_PATH_URI
|
- name: TSS_TOKEN_PATH_URI
|
||||||
required: false
|
required: false
|
||||||
|
|
Loading…
Reference in a new issue