mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Elasticsearch: Add proxy support
Add proxy support for plugin installation.
This commit is contained in:
parent
126f8b709f
commit
32d4a8811c
1 changed files with 9 additions and 2 deletions
|
@ -124,16 +124,20 @@ def main():
|
|||
timeout=dict(default="1m"),
|
||||
plugin_bin=dict(default="/usr/share/elasticsearch/bin/plugin"),
|
||||
plugin_dir=dict(default="/usr/share/elasticsearch/plugins/"),
|
||||
proxy_host=dict(default=None),
|
||||
proxy_port=dict(default=None),
|
||||
version=dict(default=None)
|
||||
)
|
||||
)
|
||||
|
||||
plugin_bin = module.params["plugin_bin"]
|
||||
plugin_dir = module.params["plugin_dir"]
|
||||
name = module.params["name"]
|
||||
state = module.params["state"]
|
||||
url = module.params["url"]
|
||||
timeout = module.params["timeout"]
|
||||
plugin_bin = module.params["plugin_bin"]
|
||||
plugin_dir = module.params["plugin_dir"]
|
||||
proxy_host = module.params["proxy_host"]
|
||||
proxy_port = module.params["proxy_port"]
|
||||
version = module.params["version"]
|
||||
|
||||
present = is_plugin_present(parse_plugin_repo(name), plugin_dir)
|
||||
|
@ -147,6 +151,9 @@ def main():
|
|||
|
||||
cmd_args = [plugin_bin, package_state_map[state], name]
|
||||
|
||||
if proxy_host and proxy_port:
|
||||
cmd_args.append("-DproxyHost=%s -DproxyPort=%s" % proxy_host, proxy_port)
|
||||
|
||||
if url:
|
||||
cmd_args.append("--url %s" % url)
|
||||
|
||||
|
|
Loading…
Reference in a new issue