Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add optional use_tls parameter #6154

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/6154-znode-optional-tls.yml
Original file line number Diff line number Diff line change
@@ -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).
10 changes: 9 additions & 1 deletion plugins/modules/znode.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@
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
Expand Down Expand Up @@ -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
)
Expand Down Expand Up @@ -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'])
MartinHelwig marked this conversation as resolved.
Show resolved Hide resolved

def absent(self):
return self._absent(self.module.params['name'])
Expand Down