mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-01 22:13:21 -07:00
Fix various sanity errors in plugins (#881)
* Fix deprecation of callables. * Fix various sanity errors. * Revert callback_type -> type transform. * Fix stat_result times: these are float according to https://github.com/python/typeshed/blob/master/stdlib/3/os/__init__.pyi * Apply suggestions from code review Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
This commit is contained in:
parent
38996b7544
commit
7cf472855c
28 changed files with 88 additions and 27 deletions
|
@ -34,7 +34,9 @@ EXAMPLES = """
|
|||
RETURN = """
|
||||
_raw:
|
||||
description:
|
||||
- The value from the databag
|
||||
- The value from the databag.
|
||||
type: list
|
||||
elements: dict
|
||||
"""
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
|
|
|
@ -98,6 +98,7 @@ RETURN = """
|
|||
_raw:
|
||||
description:
|
||||
- Value(s) stored in consul.
|
||||
type: dict
|
||||
"""
|
||||
|
||||
import os
|
||||
|
|
|
@ -78,7 +78,8 @@ EXAMPLES = """
|
|||
RETURN = """
|
||||
_raw:
|
||||
description:
|
||||
- value(s) stored in Credstash
|
||||
- Value(s) stored in Credstash.
|
||||
type: str
|
||||
"""
|
||||
|
||||
import os
|
||||
|
|
|
@ -30,8 +30,8 @@ DOCUMENTATION = '''
|
|||
default: 'password'
|
||||
_extra:
|
||||
description: for extra_params values please check parameters for clipasswordsdk in CyberArk's "Credential Provider and ASCP Implementation Guide"
|
||||
note:
|
||||
- For Ansible on windows, please change the -parameters (-p, -d, and -o) to /parameters (/p, /d, and /o) and change the location of CLIPasswordSDK.exe
|
||||
notes:
|
||||
- For Ansible on Windows, please change the -parameters (-p, -d, and -o) to /parameters (/p, /d, and /o) and change the location of CLIPasswordSDK.exe.
|
||||
'''
|
||||
|
||||
EXAMPLES = """
|
||||
|
|
|
@ -77,8 +77,10 @@ EXAMPLES = """
|
|||
RETURN = """
|
||||
_list:
|
||||
description:
|
||||
- list of composed strings or dictionaries with key and value
|
||||
- List of composed strings or dictionaries with key and value
|
||||
If a dictionary, fields shows the keys returned depending on query type
|
||||
type: list
|
||||
elements: raw
|
||||
contains:
|
||||
ALL:
|
||||
description:
|
||||
|
|
|
@ -70,6 +70,8 @@ _list:
|
|||
description:
|
||||
- One or more JSON responses to C(GET /secrets/{path}).
|
||||
- See U(https://dsv.thycotic.com/api/index.html#operation/getSecret).
|
||||
type: list
|
||||
elements: dict
|
||||
"""
|
||||
|
||||
EXAMPLES = r"""
|
||||
|
|
|
@ -94,6 +94,7 @@ DOCUMENTATION = '''
|
|||
seealso:
|
||||
- module: community.general.etcd3
|
||||
- ref: etcd_lookup
|
||||
description: The etcd v2 lookup.
|
||||
|
||||
requirements:
|
||||
- "etcd3 >= 0.10"
|
||||
|
|
|
@ -53,42 +53,60 @@ EXAMPLES = r"""
|
|||
|
||||
RETURN = r"""
|
||||
_raw:
|
||||
description: list of dictionaries with file information
|
||||
description: List of dictionaries with file information.
|
||||
type: list
|
||||
elements: dict
|
||||
contains:
|
||||
src:
|
||||
description:
|
||||
- full path to file.
|
||||
- not returned when C(item.state) is set to C(directory).
|
||||
- Full path to file.
|
||||
- Not returned when I(item.state) is set to C(directory).
|
||||
type: path
|
||||
root:
|
||||
description: allows filtering by original location.
|
||||
description: Allows filtering by original location.
|
||||
type: path
|
||||
path:
|
||||
description: contains the relative path to root.
|
||||
description: Contains the relative path to root.
|
||||
type: path
|
||||
mode:
|
||||
description: The permissions the resulting file or directory.
|
||||
type: str
|
||||
state:
|
||||
description: TODO
|
||||
type: str
|
||||
owner:
|
||||
description: Name of the user that owns the file/directory.
|
||||
type: raw
|
||||
group:
|
||||
description: Name of the group that owns the file/directory.
|
||||
type: raw
|
||||
seuser:
|
||||
description: The user part of the SELinux file context.
|
||||
type: raw
|
||||
serole:
|
||||
description: The role part of the SELinux file context.
|
||||
type: raw
|
||||
setype:
|
||||
description: The type part of the SELinux file context.
|
||||
type: raw
|
||||
selevel:
|
||||
description: The level part of the SELinux file context.
|
||||
type: raw
|
||||
uid:
|
||||
description: Owner ID of the file/directory.
|
||||
type: int
|
||||
gid:
|
||||
description: Group ID of the file/directory.
|
||||
type: int
|
||||
size:
|
||||
description: Size of the target.
|
||||
type: int
|
||||
mtime:
|
||||
description: Time of last modification.
|
||||
type: float
|
||||
ctime:
|
||||
description: Time of last metadata update or creation (depends on OS).
|
||||
type: float
|
||||
"""
|
||||
import os
|
||||
import pwd
|
||||
|
|
|
@ -40,6 +40,8 @@ RETURN = '''
|
|||
_raw:
|
||||
description:
|
||||
- base64 encoded file content
|
||||
type: list
|
||||
elements: str
|
||||
'''
|
||||
|
||||
import base64
|
||||
|
|
|
@ -241,6 +241,8 @@ RETURN = """
|
|||
_raw:
|
||||
description:
|
||||
- secrets(s) requested
|
||||
type: list
|
||||
elements: dict
|
||||
"""
|
||||
|
||||
import os
|
||||
|
|
|
@ -18,7 +18,7 @@ DOCUMENTATION = '''
|
|||
description:
|
||||
- The list of keys to lookup on the Puppetmaster
|
||||
type: list
|
||||
element_type: string
|
||||
elements: string
|
||||
required: True
|
||||
_bin_file:
|
||||
description:
|
||||
|
@ -55,7 +55,8 @@ RETURN = """
|
|||
_raw:
|
||||
description:
|
||||
- a value associated with input key
|
||||
type: strings
|
||||
type: list
|
||||
elements: str
|
||||
"""
|
||||
|
||||
import os
|
||||
|
|
|
@ -29,7 +29,9 @@ EXAMPLES = """
|
|||
|
||||
RETURN = """
|
||||
_raw:
|
||||
description: secrets stored
|
||||
description: Secrets stored.
|
||||
type: list
|
||||
elements: str
|
||||
"""
|
||||
|
||||
HAS_KEYRING = True
|
||||
|
|
|
@ -32,6 +32,8 @@ EXAMPLES = """
|
|||
RETURN = """
|
||||
_raw:
|
||||
description: secrets stored
|
||||
type: list
|
||||
elements: str
|
||||
"""
|
||||
|
||||
from subprocess import Popen, PIPE
|
||||
|
|
|
@ -48,6 +48,8 @@ EXAMPLES = """
|
|||
RETURN = """
|
||||
_raw:
|
||||
description: value(s) stored in LMDB
|
||||
type: list
|
||||
elements: raw
|
||||
"""
|
||||
|
||||
|
||||
|
|
|
@ -83,7 +83,6 @@ RETURN = """
|
|||
obj_type:
|
||||
description:
|
||||
- The object type specified in the terms argument
|
||||
returned: always
|
||||
type: complex
|
||||
contains:
|
||||
obj_field:
|
||||
|
|
|
@ -64,7 +64,6 @@ RETURN = """
|
|||
_list:
|
||||
description:
|
||||
- The list of next IP addresses available
|
||||
returned: always
|
||||
type: list
|
||||
"""
|
||||
|
||||
|
|
|
@ -74,7 +74,6 @@ RETURN = """
|
|||
_list:
|
||||
description:
|
||||
- The list of next network addresses available
|
||||
returned: always
|
||||
type: list
|
||||
"""
|
||||
|
||||
|
|
|
@ -86,6 +86,8 @@ EXAMPLES = """
|
|||
RETURN = """
|
||||
_raw:
|
||||
description: field data requested
|
||||
type: list
|
||||
elements: str
|
||||
"""
|
||||
|
||||
import errno
|
||||
|
|
|
@ -62,6 +62,8 @@ EXAMPLES = """
|
|||
RETURN = """
|
||||
_raw:
|
||||
description: field data requested
|
||||
type: list
|
||||
elements: dict
|
||||
"""
|
||||
|
||||
import json
|
||||
|
|
|
@ -91,6 +91,8 @@ RETURN = """
|
|||
_raw:
|
||||
description:
|
||||
- a password
|
||||
type: list
|
||||
elements: str
|
||||
"""
|
||||
|
||||
import os
|
||||
|
|
|
@ -67,6 +67,8 @@ EXAMPLES = """
|
|||
RETURN = """
|
||||
_raw:
|
||||
description: value(s) stored in Redis
|
||||
type: list
|
||||
elements: str
|
||||
"""
|
||||
|
||||
import os
|
||||
|
|
|
@ -29,6 +29,8 @@ EXAMPLES = """
|
|||
RETURN = """
|
||||
_list:
|
||||
description: value(s) of key(s) in shelve file(s)
|
||||
type: list
|
||||
elements: str
|
||||
"""
|
||||
import shelve
|
||||
|
||||
|
|
|
@ -66,6 +66,8 @@ _list:
|
|||
description:
|
||||
- The JSON responses to C(GET /secrets/{id}).
|
||||
- See U(https://updates.thycotic.net/secretserver/restapiguide/TokenAuth/#operation--secrets--id--get).
|
||||
type: list
|
||||
elements: dict
|
||||
"""
|
||||
|
||||
EXAMPLES = r"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue