1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Show how to assign lookup plugins in variables

This commit is contained in:
Michael DeHaan 2013-02-02 12:19:21 -05:00
parent fe5ab64b62
commit 1e3df3b5ab

View file

@ -500,6 +500,14 @@ Many new lookup abilities were added in 0.9. Remeber lookup plugins are run on
with_template:
- ./some_template.j2
You can also assign these to variables, should you wish to do this instead, that will be evaluated
when they are used in a task (or template)::
vars:
redis_value: msg=$LOOKUP(redis,redis://localhost:6379,info_${inventory_hostname})
tasks:
- debug: msg=Redis value for host is $redis_value
.. versionadded: 1.0
'with_sequence' generates a sequence of items in ascending numerical order. You