1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

sanity: Fix sanity check for modules (#587)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2020-07-31 14:27:57 +05:30 committed by GitHub
parent 623817b0b7
commit 291ceffecb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 43 additions and 46 deletions

View file

@ -8,13 +8,13 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
DOCUMENTATION = r'''
---
module: atomic_container
short_description: Manage the containers on the atomic host platform
description:
- Manage the containers on the atomic host platform
- Allows to manage the lifecycle of a container on the atomic host platform
- Manage the containers on the atomic host platform.
- Allows to manage the lifecycle of a container on the atomic host platform.
author: "Giuseppe Scrivano (@giuseppe)"
notes:
- Host should support C(atomic) command
@ -24,38 +24,47 @@ requirements:
options:
backend:
description:
- Define the backend to use for the container
- Define the backend to use for the container.
required: True
choices: ["docker", "ostree"]
type: str
name:
description:
- Name of the container
- Name of the container.
required: True
type: str
image:
description:
- The image to use to install the container
- The image to use to install the container.
required: True
type: str
rootfs:
description:
- Define the rootfs of the image
- Define the rootfs of the image.
type: str
state:
description:
- State of the container
- State of the container.
required: True
choices: ["latest", "present", "absent", "rollback"]
choices: ["absent", "latest", "present", "rollback"]
default: "latest"
type: str
mode:
description:
- Define if it is an user or a system container
- Define if it is an user or a system container.
required: True
choices: ["user", "system"]
type: str
values:
description:
- Values for the installation of the container. This option is permitted only with mode 'user' or 'system'.
The values specified here will be used at installation time as --set arguments for atomic install.
- Values for the installation of the container.
- This option is permitted only with mode 'user' or 'system'.
- The values specified here will be used at installation time as --set arguments for atomic install.
type: list
elements: str
'''
EXAMPLES = '''
EXAMPLES = r'''
- name: Install the etcd system container
community.general.atomic_container:
@ -76,7 +85,7 @@ EXAMPLES = '''
mode: system
'''
RETURN = '''
RETURN = r'''
msg:
description: The command standard output
returned: always
@ -174,12 +183,12 @@ def main():
module = AnsibleModule(
argument_spec=dict(
mode=dict(default=None, choices=['user', 'system']),
name=dict(default=None, required=True),
image=dict(default=None, required=True),
name=dict(required=True),
image=dict(required=True),
rootfs=dict(default=None),
state=dict(default='latest', choices=['present', 'absent', 'latest', 'rollback']),
backend=dict(default=None, required=True, choices=['docker', 'ostree']),
values=dict(type='list', default=[]),
backend=dict(required=True, choices=['docker', 'ostree']),
values=dict(type='list', default=[], elements='str'),
),
)

View file

@ -7,7 +7,7 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
DOCUMENTATION = r'''
---
module: atomic_host
short_description: Manage the atomic host platform
@ -24,12 +24,14 @@ requirements:
options:
revision:
description:
- The version number of the atomic host to be deployed. Providing C(latest) will upgrade to the latest available version.
default: latest
- The version number of the atomic host to be deployed.
- Providing C(latest) will upgrade to the latest available version.
default: 'latest'
aliases: [ version ]
type: str
'''
EXAMPLES = '''
EXAMPLES = r'''
- name: Upgrade the atomic host platform to the latest version (atomic host upgrade)
community.general.atomic_host:
revision: latest
@ -39,7 +41,7 @@ EXAMPLES = '''
revision: 23.130
'''
RETURN = '''
RETURN = r'''
msg:
description: The command standard output
returned: always

View file

@ -7,7 +7,7 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
DOCUMENTATION = r'''
---
module: atomic_image
short_description: Manage the container images on the atomic host platform
@ -25,17 +25,20 @@ options:
backend:
description:
- Define the backend where the image is pulled.
choices: [ docker, ostree ]
choices: [ 'docker', 'ostree' ]
type: str
name:
description:
- Name of the container image.
required: True
type: str
state:
description:
- The state of the container image.
- The state C(latest) will ensure container image is upgraded to the latest version and forcefully restart container, if running.
choices: [ absent, latest, present ]
default: latest
choices: [ 'absent', 'latest', 'present' ]
default: 'latest'
type: str
started:
description:
- Start or Stop the container.
@ -43,7 +46,7 @@ options:
default: 'yes'
'''
EXAMPLES = '''
EXAMPLES = r'''
- name: Execute the run command on rsyslog container image (atomic run rhel7/rsyslog)
community.general.atomic_image:
name: rhel7/rsyslog
@ -56,7 +59,7 @@ EXAMPLES = '''
backend: ostree
'''
RETURN = '''
RETURN = r'''
msg:
description: The command standard output
returned: always

View file

@ -2,13 +2,7 @@ plugins/callback/hipchat.py pylint:blacklisted-name
plugins/connection/lxc.py pylint:blacklisted-name
plugins/module_utils/compat/ipaddress.py no-assert
plugins/module_utils/compat/ipaddress.py no-unicode-literals
plugins/modules/cloud/atomic/atomic_container.py validate-modules:doc-missing-type
plugins/modules/cloud/atomic/atomic_container.py validate-modules:doc-required-mismatch
plugins/modules/cloud/atomic/atomic_container.py validate-modules:no-default-for-required-parameter
plugins/modules/cloud/atomic/atomic_container.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/atomic/atomic_container.py validate-modules:parameter-type-not-in-doc
plugins/modules/cloud/atomic/atomic_host.py validate-modules:parameter-type-not-in-doc
plugins/modules/cloud/atomic/atomic_image.py validate-modules:parameter-type-not-in-doc
plugins/modules/cloud/centurylink/clc_aa_policy.py validate-modules:doc-missing-type
plugins/modules/cloud/centurylink/clc_aa_policy.py yamllint:unparsable-with-libyaml
plugins/modules/cloud/centurylink/clc_alert_policy.py validate-modules:doc-missing-type

View file

@ -2,13 +2,7 @@ plugins/callback/hipchat.py pylint:blacklisted-name
plugins/connection/lxc.py pylint:blacklisted-name
plugins/module_utils/compat/ipaddress.py no-assert
plugins/module_utils/compat/ipaddress.py no-unicode-literals
plugins/modules/cloud/atomic/atomic_container.py validate-modules:doc-missing-type
plugins/modules/cloud/atomic/atomic_container.py validate-modules:doc-required-mismatch
plugins/modules/cloud/atomic/atomic_container.py validate-modules:no-default-for-required-parameter
plugins/modules/cloud/atomic/atomic_container.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/atomic/atomic_container.py validate-modules:parameter-type-not-in-doc
plugins/modules/cloud/atomic/atomic_host.py validate-modules:parameter-type-not-in-doc
plugins/modules/cloud/atomic/atomic_image.py validate-modules:parameter-type-not-in-doc
plugins/modules/cloud/centurylink/clc_aa_policy.py validate-modules:doc-missing-type
plugins/modules/cloud/centurylink/clc_aa_policy.py yamllint:unparsable-with-libyaml
plugins/modules/cloud/centurylink/clc_alert_policy.py validate-modules:doc-missing-type

View file

@ -2,11 +2,6 @@ plugins/callback/hipchat.py pylint:blacklisted-name
plugins/connection/lxc.py pylint:blacklisted-name
plugins/module_utils/compat/ipaddress.py no-assert
plugins/module_utils/compat/ipaddress.py no-unicode-literals
plugins/modules/cloud/atomic/atomic_container.py validate-modules:doc-missing-type
plugins/modules/cloud/atomic/atomic_container.py validate-modules:no-default-for-required-parameter
plugins/modules/cloud/atomic/atomic_container.py validate-modules:parameter-type-not-in-doc
plugins/modules/cloud/atomic/atomic_host.py validate-modules:parameter-type-not-in-doc
plugins/modules/cloud/atomic/atomic_image.py validate-modules:parameter-type-not-in-doc
plugins/modules/cloud/centurylink/clc_aa_policy.py validate-modules:doc-missing-type
plugins/modules/cloud/centurylink/clc_alert_policy.py validate-modules:doc-missing-type
plugins/modules/cloud/centurylink/clc_alert_policy.py validate-modules:no-default-for-required-parameter