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

elasticsearch_plugin: add check mode support (#3043)

This commit is contained in:
Thierno IB. BARRY 2016-10-28 17:50:46 +02:00 committed by Matt Clay
parent b69fb8a1ca
commit b09291be2c

View file

@ -142,6 +142,9 @@ def install_plugin(module, plugin_bin, plugin_name, version, url, proxy_host, pr
cmd = " ".join(cmd_args)
if module.check_mode:
rc, out, err = 0, "check mode", ""
else:
rc, out, err = module.run_command(cmd)
if rc != 0:
@ -155,6 +158,9 @@ def remove_plugin(module, plugin_bin, plugin_name):
cmd = " ".join(cmd_args)
if module.check_mode:
rc, out, err = 0, "check mode", ""
else:
rc, out, err = module.run_command(cmd)
if rc != 0:
@ -175,7 +181,8 @@ def main():
proxy_host=dict(default=None),
proxy_port=dict(default=None),
version=dict(default=None)
)
),
supports_check_mode=True
)
name = module.params["name"]