The documentation would indeed be nice, however it really doesn't go into 
great detail on how plugins are loaded, when they are part of  role. In my 
specific case, I used the example in _the source_ for a lookup.  I copied 
their plugin code exactly (to load the data from a file to a variable) 
since it is close to what I need.  I was able to run things just ducky. 
 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.

Thanks for responding.  Appreciate your taking the time to look at my 
problem.



>
> > The problems I am currently struggling with are these: 
> > 
> > Where does the plugin go within the role folder hierarchy,  or does it 
> need 
> > to be global?  I have found various contradictory sources that state it 
> > goes in "plugins/lookup"  or "lookup_plugins",or  in Ansible root. 
>
> Instead of looking around why not just go to _the source_, the Ansible 
> docmentation? 
> https://docs.ansible.com/ansible/latest/dev_guide/developing_plugins.html 
>
> https://docs.ansible.com/ansible/latest/dev_guide/developing_plugins.html#distributing-plugins
>  
>
>
> -- 
> 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/ccaf05ab-ed9f-4c1e-8879-8d020f9d6499%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to