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

rabbitmq: Clean up parameter types (#52525)

This PR includes:
- Parameter types added
- Copyright format fixes
- Short license statement

This breaks out PR #52182
This commit is contained in:
Dag Wieers 2019-02-19 13:17:28 +01:00 committed by John R Barker
parent 41e2bd1df5
commit e7df487a6c
2 changed files with 36 additions and 36 deletions

View file

@ -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 '''

View file

@ -1,57 +1,57 @@
# Copyright: (c) 2016, Jorge Rodriguez <jorge.rodriguez@tiriel.eu>
# -*- coding: utf-8 -*-
# Copyright: (c) 2016, Jorge Rodriguez <jorge.rodriguez@tiriel.eu>
# 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: "/"
'''