mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-02 20:24:23 -07:00
Add https support for consul clustering modules
This commit is contained in:
parent
41af347d8d
commit
6c41d9cd38
4 changed files with 54 additions and 0 deletions
|
@ -71,6 +71,16 @@ options:
|
||||||
- the port on which the consul agent is running
|
- the port on which the consul agent is running
|
||||||
required: false
|
required: false
|
||||||
default: 8500
|
default: 8500
|
||||||
|
scheme:
|
||||||
|
description:
|
||||||
|
- the protocol scheme on which the consul agent is running
|
||||||
|
required: false
|
||||||
|
default: http
|
||||||
|
verify:
|
||||||
|
description:
|
||||||
|
- whether to verify the tls certificate of the consul agent
|
||||||
|
required: false
|
||||||
|
default: True
|
||||||
notes:
|
notes:
|
||||||
description:
|
description:
|
||||||
- Notes to attach to check when registering it.
|
- Notes to attach to check when registering it.
|
||||||
|
@ -308,6 +318,8 @@ def remove_service(module, service_id):
|
||||||
def get_consul_api(module, token=None):
|
def get_consul_api(module, token=None):
|
||||||
return consul.Consul(host=module.params.get('host'),
|
return consul.Consul(host=module.params.get('host'),
|
||||||
port=module.params.get('port'),
|
port=module.params.get('port'),
|
||||||
|
scheme=module.params.get('scheme'),
|
||||||
|
verify=module.params.get('verify'),
|
||||||
token=module.params.get('token'))
|
token=module.params.get('token'))
|
||||||
|
|
||||||
|
|
||||||
|
@ -503,6 +515,8 @@ def main():
|
||||||
argument_spec=dict(
|
argument_spec=dict(
|
||||||
host=dict(default='localhost'),
|
host=dict(default='localhost'),
|
||||||
port=dict(default=8500, type='int'),
|
port=dict(default=8500, type='int'),
|
||||||
|
scheme=dict(required=False, default='http'),
|
||||||
|
verify=dict(required=False, default=True, type='bool'),
|
||||||
check_id=dict(required=False),
|
check_id=dict(required=False),
|
||||||
check_name=dict(required=False),
|
check_name=dict(required=False),
|
||||||
check_node=dict(required=False),
|
check_node=dict(required=False),
|
||||||
|
|
|
@ -69,6 +69,16 @@ options:
|
||||||
- the port on which the consul agent is running
|
- the port on which the consul agent is running
|
||||||
required: false
|
required: false
|
||||||
default: 8500
|
default: 8500
|
||||||
|
scheme:
|
||||||
|
description:
|
||||||
|
- the protocol scheme on which the consul agent is running
|
||||||
|
required: false
|
||||||
|
default: http
|
||||||
|
verify:
|
||||||
|
description:
|
||||||
|
- whether to verify the tls certificate of the consul agent
|
||||||
|
required: false
|
||||||
|
default: True
|
||||||
"""
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
|
@ -300,6 +310,8 @@ def get_consul_api(module, token=None):
|
||||||
token = module.params.get('token')
|
token = module.params.get('token')
|
||||||
return consul.Consul(host=module.params.get('host'),
|
return consul.Consul(host=module.params.get('host'),
|
||||||
port=module.params.get('port'),
|
port=module.params.get('port'),
|
||||||
|
scheme=module.params.get('scheme'),
|
||||||
|
verify=module.params.get('verify'),
|
||||||
token=token)
|
token=token)
|
||||||
|
|
||||||
def test_dependencies(module):
|
def test_dependencies(module):
|
||||||
|
@ -315,6 +327,8 @@ def main():
|
||||||
argument_spec = dict(
|
argument_spec = dict(
|
||||||
mgmt_token=dict(required=True, no_log=True),
|
mgmt_token=dict(required=True, no_log=True),
|
||||||
host=dict(default='localhost'),
|
host=dict(default='localhost'),
|
||||||
|
scheme=dict(required=False, default='http'),
|
||||||
|
verify=dict(required=False, default=True),
|
||||||
name=dict(required=False),
|
name=dict(required=False),
|
||||||
port=dict(default=8500, type='int'),
|
port=dict(default=8500, type='int'),
|
||||||
rules=dict(default=None, required=False, type='list'),
|
rules=dict(default=None, required=False, type='list'),
|
||||||
|
|
|
@ -99,6 +99,16 @@ options:
|
||||||
- the port on which the consul agent is running
|
- the port on which the consul agent is running
|
||||||
required: false
|
required: false
|
||||||
default: 8500
|
default: 8500
|
||||||
|
scheme:
|
||||||
|
description:
|
||||||
|
- the protocol scheme on which the consul agent is running
|
||||||
|
required: false
|
||||||
|
default: http
|
||||||
|
verify:
|
||||||
|
description:
|
||||||
|
- whether to verify the tls certificate of the consul agent
|
||||||
|
required: false
|
||||||
|
default: True
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
@ -218,6 +228,8 @@ def remove_value(module):
|
||||||
def get_consul_api(module, token=None):
|
def get_consul_api(module, token=None):
|
||||||
return consul.Consul(host=module.params.get('host'),
|
return consul.Consul(host=module.params.get('host'),
|
||||||
port=module.params.get('port'),
|
port=module.params.get('port'),
|
||||||
|
scheme=module.params.get('scheme'),
|
||||||
|
verify=module.params.get('verify'),
|
||||||
token=module.params.get('token'))
|
token=module.params.get('token'))
|
||||||
|
|
||||||
def test_dependencies(module):
|
def test_dependencies(module):
|
||||||
|
@ -232,6 +244,8 @@ def main():
|
||||||
flags=dict(required=False),
|
flags=dict(required=False),
|
||||||
key=dict(required=True),
|
key=dict(required=True),
|
||||||
host=dict(default='localhost'),
|
host=dict(default='localhost'),
|
||||||
|
scheme=dict(required=False, default='http'),
|
||||||
|
verify=dict(required=False, default=True),
|
||||||
port=dict(default=8500, type='int'),
|
port=dict(default=8500, type='int'),
|
||||||
recurse=dict(required=False, type='bool'),
|
recurse=dict(required=False, type='bool'),
|
||||||
retrieve=dict(required=False, default=True),
|
retrieve=dict(required=False, default=True),
|
||||||
|
|
|
@ -88,6 +88,16 @@ options:
|
||||||
- the port on which the consul agent is running
|
- the port on which the consul agent is running
|
||||||
required: false
|
required: false
|
||||||
default: 8500
|
default: 8500
|
||||||
|
scheme:
|
||||||
|
description:
|
||||||
|
- the protocol scheme on which the consul agent is running
|
||||||
|
required: false
|
||||||
|
default: http
|
||||||
|
verify:
|
||||||
|
description:
|
||||||
|
- whether to verify the tls certificate of the consul agent
|
||||||
|
required: false
|
||||||
|
default: True
|
||||||
"""
|
"""
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
|
@ -239,6 +249,8 @@ def main():
|
||||||
delay=dict(required=False,type='str', default='15s'),
|
delay=dict(required=False,type='str', default='15s'),
|
||||||
host=dict(default='localhost'),
|
host=dict(default='localhost'),
|
||||||
port=dict(default=8500, type='int'),
|
port=dict(default=8500, type='int'),
|
||||||
|
scheme=dict(required=False, default='http'),
|
||||||
|
verify=dict(required=False, default=True),
|
||||||
id=dict(required=False),
|
id=dict(required=False),
|
||||||
name=dict(required=False),
|
name=dict(required=False),
|
||||||
node=dict(required=False),
|
node=dict(required=False),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue