>
> Thanks for your help, Kai. Couldn't have done it alone. I am now able
> run the plugin using:
>
- set_fact: contents2="{{ lookup('prospectors', 'Base.yaml' ) }}"
Question: What would be the correct syntax to send an array of files to
> load? Plugin code appears to loop through (for term in terms) the
> arguments, but not sure how to send both Base.yaml and Base2.yaml. Curly
> brackets, quotes, square brackets, commas, ... Too many options.
>
The value passed into the plugin for "terms" with the single value syntax
above is* [u'Base.yaml']*
>
> > Then I changed the name of my alleged lookup plugin to
> "prospectors.py"
> > and changed the name of the call to {{ lookup('prospectors',
> > 'vars/prospectors/Base.yaml') }}. It fails. That means either my
> plugin
> > is in the wrong place (and since it is in a role that I need to be
> portable
> > it should be in the role hierarchy) or there is some reference to the
> name
> > in the code that I missed. The documentation doesnt say anything about
> the
> > relationship between the name of the lookup plugin, and how it is called
> in
> > the playbook. Since "file" is a built-in, the example is not really
> valid.
>
> The name of the file is the name of the plugin.
>
> In your case it should be roles/filebeat/lookup_plugins/prospectors.py
> and since the plugin is in a role you need to apply the role for the
> plugin to be available.
>
>
> --
> Kai Stian Olstad
>
--
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/d085c0d4-287f-41f9-9435-b39bc3a4d80f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.