mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
add optional use_tls parameter (#6154)
* add optional use_tls parameter * add optional use_tls parameter --------- Co-authored-by: Martin Helwig <prostep.helwig@extaccount.com>
This commit is contained in:
parent
b97bee3fd6
commit
1dd86bcb55
2 changed files with 11 additions and 1 deletions
2
changelogs/fragments/6154-znode-optional-tls.yml
Normal file
2
changelogs/fragments/6154-znode-optional-tls.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- znode module - optional ``use_tls`` parameter added for encrypted communication (https://github.com/ansible-collections/community.general/issues/6154).
|
|
@ -72,6 +72,13 @@ options:
|
|||
type: str
|
||||
required: false
|
||||
version_added: 5.8.0
|
||||
use_tls:
|
||||
description:
|
||||
- Using TLS/SSL or not.
|
||||
type: bool
|
||||
default: false
|
||||
required: false
|
||||
version_added: '6.5.0'
|
||||
requirements:
|
||||
- kazoo >= 2.1
|
||||
- python >= 2.6
|
||||
|
@ -155,6 +162,7 @@ def main():
|
|||
recursive=dict(default=False, type='bool'),
|
||||
auth_scheme=dict(default='digest', choices=['digest', 'sasl']),
|
||||
auth_credential=dict(type='str', no_log=True),
|
||||
use_tls=dict(default=False, type='bool'),
|
||||
),
|
||||
supports_check_mode=False
|
||||
)
|
||||
|
@ -208,7 +216,7 @@ def check_params(params):
|
|||
class KazooCommandProxy():
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
self.zk = KazooClient(module.params['hosts'])
|
||||
self.zk = KazooClient(module.params['hosts'], use_ssl=module.params['use_tls'])
|
||||
|
||||
def absent(self):
|
||||
return self._absent(self.module.params['name'])
|
||||
|
|
Loading…
Reference in a new issue