elasticsearch_plugin fails when plugin_bin is None #31824
Labels
affects_2.5
This issue/PR affects Ansible v2.5
bug
This issue/PR relates to a bug.
module
This issue/PR relates to a module.
python3
support:community
This issue/PR relates to code supported by the Ansible community.
ISSUE TYPE
COMPONENT NAME
elasticsearch_plugin module
ANSIBLE VERSION
CONFIGURATION
None
OS / ENVIRONMENT
Ubuntu, Elasticsearch 6.x beta
SUMMARY
elasticsearch_plugin raises
UnboundLocalError: local variable 'valid_plugin_bin' referenced before assignment
when called with defaultplugin_bin
arg (which is None).The problem lies in the
get_plugin_bin
function: it does nothing whenplugin_bin
is None, but still tries to checkvalid_plugin_bin
at the end.Applying the following patch seems to resolve the issue.
STEPS TO REPRODUCE
EXPECTED RESULTS
It would install plugins from
{{ elasticsearch_plugins }}
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: