No, lookup plugins (except when they implement iterators) are a hack to
fill in some rare but important use cases, most notably sourcing file data
to the authorized_key module, and a few others.   They are rarely used.

I'd use the stat module here.





On Wed, Mar 5, 2014 at 5:37 AM, anatoly techtonik <[email protected]>wrote:

> On Wed, Mar 5, 2014 at 6:11 AM, Brian Coca <[email protected]> wrote:
> > - name: check exists
> >    stat: path={{hgrc}}
> >    ignore_errors: true
> >    register: hgrcfile
> >
> >  - name: create .hgrc if necessary
> >    file: path={{ hgrc }} owner={{ user }} state=touch
> >    when: hgrcfile.failed
> >
> >
> > On Tue, Mar 4, 2014 at 10:10 PM, Brian Coca <[email protected]> wrote:
> >>
> >> they are called tasks
> >
>
> Thanks. Tasks are fine, but distracting from logic. Lookup plugins are
> just right for these kind of checks, but they only work on controlling
> machine, so it would be nice to have a mechanism for remote lookups, no?
>
> --
> 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/CAPkN8xKwLQjYF3azievSU0FQb4qOxC_K%2BJFz2J9aWtCRg4i1bg%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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/CAEVJ8QNKkoqfP7XQ%3D%3DqXE5MStXxvvjs_OR50uayS0oCa0TXynw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to