diff --git a/lib/ansible/module_utils/rabbitmq.py b/lib/ansible/module_utils/rabbitmq.py index 3a58716515..92704ead88 100644 --- a/lib/ansible/module_utils/rabbitmq.py +++ b/lib/ansible/module_utils/rabbitmq.py @@ -27,15 +27,15 @@ except ImportError: def rabbitmq_argument_spec(): return dict( - login_user=dict(default='guest', type='str'), - login_password=dict(default='guest', type='str', no_log=True), - login_host=dict(default='localhost', type='str'), - login_port=dict(default='15672', type='str'), - login_protocol=dict(default='http', choices=['http', 'https'], type='str'), - cacert=dict(required=False, type='path', default=None), - cert=dict(required=False, type='path', default=None), - key=dict(required=False, type='path', default=None), - vhost=dict(default='/', type='str'), + login_user=dict(type='str', default='guest'), + login_password=dict(type='str', default='guest', no_log=True), + login_host=dict(type='str', default='localhost'), + login_port=dict(type='str', default='15672'), + login_protocol=dict(type='str', default='http', choices=['http', 'https']), + cacert=dict(type='path'), + cert=dict(type='path'), + key=dict(type='path'), + vhost=dict(type='str', default='/'), ) @@ -77,14 +77,14 @@ class RabbitClient(): @staticmethod def rabbitmq_argument_spec(): return dict( - url=dict(default=None, type='str'), - proto=dict(default=None, type='str', choices=['amqps', 'amqp']), - host=dict(default=None, type='str'), - port=dict(default=None, type='int'), - username=dict(default=None, type='str'), - password=dict(default=None, type='str', no_log=True), - vhost=dict(default=None, type='str'), - queue=dict(default=None, type='str') + url=dict(type='str'), + proto=dict(type='str', choices=['amqp', 'amqps']), + host=dict(type='str'), + port=dict(type='int'), + username=dict(type='str'), + password=dict(type='str', no_log=True), + vhost=dict(type='str'), + queue=dict(type='str') ) ''' Consider some file size limits here ''' diff --git a/lib/ansible/plugins/doc_fragments/rabbitmq.py b/lib/ansible/plugins/doc_fragments/rabbitmq.py index 87c52346d6..426a7e0336 100644 --- a/lib/ansible/plugins/doc_fragments/rabbitmq.py +++ b/lib/ansible/plugins/doc_fragments/rabbitmq.py @@ -1,57 +1,57 @@ -# Copyright: (c) 2016, Jorge Rodriguez +# -*- coding: utf-8 -*- +# Copyright: (c) 2016, Jorge Rodriguez # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Parameters for RabbitMQ modules - DOCUMENTATION = ''' + DOCUMENTATION = r''' options: login_user: description: - - rabbitMQ user for connection. - required: false + - RabbitMQ user for connection. + type: str default: guest login_password: description: - - rabbitMQ password for connection. - required: false - default: false + - RabbitMQ password for connection. + type: str login_host: description: - - rabbitMQ host for connection. - required: false + - RabbitMQ host for connection. + type: str default: localhost login_port: description: - - rabbitMQ management API port. - required: false - default: 15672 + - RabbitMQ management API port. + type: str + default: '15672' login_protocol: description: - - rabbitMQ management API protocol. + - RabbitMQ management API protocol. + type: str choices: [ http , https ] - required: false default: http version_added: "2.3" cacert: description: - CA certificate to verify SSL connection to management API. - required: false + type: path version_added: "2.3" cert: description: - Client certificate to send on SSL connections to management API. - required: false + type: path version_added: "2.3" key: description: - Private key matching the client certificate. - required: false + type: path version_added: "2.3" vhost: description: - - rabbitMQ virtual host. - required: false + - RabbitMQ virtual host. + type: str default: "/" '''