Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
965680a1
Commit
965680a1
authored
10 years ago
by
Brian Coca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
documented cartesian lookup in 1.9
parent
5d946ec4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
docsite/rst/playbooks_lookups.rst
+8
-4
No files found.
docsite/rst/playbooks_lookups.rst
View file @
965680a1
...
@@ -95,10 +95,6 @@ To enter comma use two commas ',,' somewhere - preferably at the end. Quotes and
...
@@ -95,10 +95,6 @@ To enter comma use two commas ',,' somewhere - preferably at the end. Quotes and
More Lookups
More Lookups
````````````
````````````
.. note:: This feature is very infrequently used in Ansible. You may wish to skip this section.
.. versionadded:: 0.8
Various *lookup plugins* allow additional ways to iterate over data. In :doc:`Loops <playbooks_loops>` you will learn
Various *lookup plugins* allow additional ways to iterate over data. In :doc:`Loops <playbooks_loops>` you will learn
how to use them to walk over collections of numerous types. However, they can also be used to pull in data
how to use them to walk over collections of numerous types. However, they can also be used to pull in data
from remote sources, such as shell commands or even key value stores. This section will cover lookup
from remote sources, such as shell commands or even key value stores. This section will cover lookup
...
@@ -129,10 +125,18 @@ Here are some examples::
...
@@ -129,10 +125,18 @@ Here are some examples::
- debug: msg="{{ lookup('etcd', 'foo') }} is a value from a locally running etcd"
- debug: msg="{{ lookup('etcd', 'foo') }} is a value from a locally running etcd"
# The following lookups were added in 1.9
- debug: msg="{{item}}"
- debug: msg="{{item}}"
with_url:
with_url:
- 'http://github.com/gremlin.keys'
- 'http://github.com/gremlin.keys'
# outputs the cartesian product of the supplied lists
- debug: msg="{{item}}"
with_cartesian:
- list1
- list2
- list3
As an alternative you can also assign lookup plugins to variables or use them
As an alternative you can also assign lookup plugins to variables or use them
elsewhere. This macros are evaluated each time they are used in a task (or
elsewhere. This macros are evaluated each time they are used in a task (or
template)::
template)::
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment