From 41b7b1c6e976e1c851b1532b67b01f4e6a448cb3 Mon Sep 17 00:00:00 2001 From: Andrey Klychkov Date: Wed, 10 Jul 2019 13:08:53 +0300 Subject: [PATCH] jboss module: actualize doc formatting (#58913) * jboss module: actualize doc formatting, remove exceptions from ignore.txt --- .../modules/web_infrastructure/jboss.py | 48 ++++++++++--------- test/sanity/validate-modules/ignore.txt | 2 - 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/lib/ansible/modules/web_infrastructure/jboss.py b/lib/ansible/modules/web_infrastructure/jboss.py index 1629ab1bed1..636cbe1f461 100644 --- a/lib/ansible/modules/web_infrastructure/jboss.py +++ b/lib/ansible/modules/web_infrastructure/jboss.py @@ -13,57 +13,61 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', 'supported_by': 'community'} -DOCUMENTATION = """ +DOCUMENTATION = r""" module: jboss version_added: "1.4" -short_description: deploy applications to JBoss +short_description: Deploy applications to JBoss description: - - Deploy applications to JBoss standalone using the filesystem + - Deploy applications to JBoss standalone using the filesystem. options: deployment: required: true description: - - The name of the deployment + - The name of the deployment. + type: str src: - required: false description: - - The remote path of the application ear or war to deploy + - The remote path of the application ear or war to deploy. + type: path deploy_path: - required: false default: /var/lib/jbossas/standalone/deployments description: - - The location in the filesystem where the deployment scanner listens + - The location in the filesystem where the deployment scanner listens. + type: path state: - required: false choices: [ present, absent ] default: "present" description: - - Whether the application should be deployed or undeployed + - Whether the application should be deployed or undeployed. + type: str notes: - - "The JBoss standalone deployment-scanner has to be enabled in standalone.xml" - - "Ensure no identically named application is deployed through the JBoss CLI" -author: "Jeroen Hoekx (@jhoekx)" + - The JBoss standalone deployment-scanner has to be enabled in standalone.xml + - Ensure no identically named application is deployed through the JBoss CLI +author: + - Jeroen Hoekx (@jhoekx) """ -EXAMPLES = """ -# Deploy a hello world application -- jboss: +EXAMPLES = r""" +- name: Deploy a hello world application + jboss: src: /tmp/hello-1.0-SNAPSHOT.war deployment: hello.war state: present -# Update the hello world application -- jboss: +- name: Update the hello world application + jboss: src: /tmp/hello-1.1-SNAPSHOT.war deployment: hello.war state: present -# Undeploy the hello world application -- jboss: +- name: Undeploy the hello world application + jboss: deployment: hello.war state: absent """ +RETURN = r""" # """ + import os import shutil import time @@ -86,9 +90,9 @@ def main(): module = AnsibleModule( argument_spec=dict( src=dict(type='path'), - deployment=dict(required=True), + deployment=dict(type='str', required=True), deploy_path=dict(type='path', default='/var/lib/jbossas/standalone/deployments'), - state=dict(choices=['absent', 'present'], default='present'), + state=dict(type='str', choices=['absent', 'present'], default='present'), ), required_if=[('state', 'present', ('src',))] ) diff --git a/test/sanity/validate-modules/ignore.txt b/test/sanity/validate-modules/ignore.txt index 09a23589802..71b44513f8a 100644 --- a/test/sanity/validate-modules/ignore.txt +++ b/test/sanity/validate-modules/ignore.txt @@ -3652,8 +3652,6 @@ lib/ansible/modules/web_infrastructure/gunicorn.py E322 lib/ansible/modules/web_infrastructure/gunicorn.py E337 lib/ansible/modules/web_infrastructure/htpasswd.py E326 lib/ansible/modules/web_infrastructure/htpasswd.py E338 -lib/ansible/modules/web_infrastructure/jboss.py E337 -lib/ansible/modules/web_infrastructure/jboss.py E338 lib/ansible/modules/web_infrastructure/jenkins_job_info.py E338 lib/ansible/modules/web_infrastructure/jenkins_job.py E338 lib/ansible/modules/web_infrastructure/jenkins_plugin.py E322