The problem was that in ansible-extra-modules a module called
"elasticsearch_plugin" already exists !
So renaming my module to "es_plugin" solved the problem.
On Wednesday, July 13, 2016 at 2:43:43 PM UTC+2, Sirk Johannsen wrote:
>
> Hi all,
>
> Ansible Version 2.1.0 installed via pip
>
> I have a strange problem with a module in a roles library path.
> This is the structure:
> roles/elasticsearch/
> roles/elasticsearch/library/
> roles/elasticsearch/library/elasticsearch_plugin.py
>
> If I execute
> ansible-playbook playbooks/elasticsearch/cluster.yml
> which basically just sets some variables and includes the above role.
>
> I get
> failed: [elasticsearch-node] (item={u'version': u'master', u'name':
> u'kopf', u'plugin': u'lmenezes/elasticsearch-kopf'}) => {"failed": true,
> "invocation": {"module_args": {"conf_dir": "/etc/elasticsearch/node1",
> "es_home": "/usr/share/elasticsearch", "instance_default_file":
> "/etc/default/node1_elasticsearch", "name": "kopf", "plugin":
> "lmenezes/elasticsearch-kopf", "state": "present", "version": "master"},
> "module_name": "elasticsearch_plugin"}, "item": {"name": "kopf", "plugin":
> "lmenezes/elasticsearch-kopf", "version": "master"}, "msg": "unsupported
> parameter for module: instance_default_file"}
>
>
> So
> "msg": "unsupported parameter for module: instance_default_file"
> is the error here. Which is very misleading. Cause in reality it does not
> find the module.
>
> Now, If I specify a module path OR put the module in the "library"
> directory of the playbook it works !!!
> ansible-playbook playbooks/elasticsearch/cluster.yml -M roles/
> elasticsearch/library/
> Output:
> ok: [elasticsearch-node] => (item={u'version': u'master', u'name':
> u'kopf', u'plugin': u'lmenezes/elasticsearch-kopf'}) => {"changed": false,
> "command": "/usr/share/elasticsearch/bin/plugin list | grep -- '- kopf$'",
> "invocation": {"module_args": {"conf_dir": "/etc/elasticsearch/node1",
> "es_home": "/usr/share/elasticsearch", "instance_default_file":
> "/etc/default/node1_elasticsearch", "name": "kopf", "plugin":
> "lmenezes/elasticsearch-kopf", "state": "present", "version": "master"},
> "module_name": "elasticsearch_plugin"}, "item": {"name": "kopf", "plugin":
> "lmenezes/elasticsearch-kopf", "version": "master"}, "output": " -
> kopf\n : ", "returncode": 0, "success": true}
>
>
> Help would be very appreciated !
>
> Sirk
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/81cbab88-4301-4fe4-817e-7899a7ceff2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.