diff --git a/plugins/modules/cloud/atomic/atomic_container.py b/plugins/modules/cloud/atomic/atomic_container.py index 0c0e94afe6..f5a950bb2d 100644 --- a/plugins/modules/cloud/atomic/atomic_container.py +++ b/plugins/modules/cloud/atomic/atomic_container.py @@ -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'), ), ) diff --git a/plugins/modules/cloud/atomic/atomic_host.py b/plugins/modules/cloud/atomic/atomic_host.py index a27b84d3e0..993933e53c 100644 --- a/plugins/modules/cloud/atomic/atomic_host.py +++ b/plugins/modules/cloud/atomic/atomic_host.py @@ -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 diff --git a/plugins/modules/cloud/atomic/atomic_image.py b/plugins/modules/cloud/atomic/atomic_image.py index 83f56dfbbc..c915ed0b78 100644 --- a/plugins/modules/cloud/atomic/atomic_image.py +++ b/plugins/modules/cloud/atomic/atomic_image.py @@ -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 diff --git a/tests/sanity/ignore-2.10.txt b/tests/sanity/ignore-2.10.txt index 4f84aa136b..1b15df1cc6 100644 --- a/tests/sanity/ignore-2.10.txt +++ b/tests/sanity/ignore-2.10.txt @@ -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 diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index 4f84aa136b..1b15df1cc6 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -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 diff --git a/tests/sanity/ignore-2.9.txt b/tests/sanity/ignore-2.9.txt index 3a371939c0..635000371a 100644 --- a/tests/sanity/ignore-2.9.txt +++ b/tests/sanity/ignore-2.9.txt @@ -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