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
0ebc29d3
Commit
0ebc29d3
authored
Sep 22, 2013
by
James Cammarata
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4203 from candeira/with_nested
fix documentation examples for with_nested
parents
77508c7b
2aae5e53
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
docsite/latest/rst/playbooks2.rst
+3
-3
No files found.
docsite/latest/rst/playbooks2.rst
View file @
0ebc29d3
...
...
@@ -500,15 +500,15 @@ Nested Loops
Loops can be nested as well::
- name: give users access to multiple databases
mysql_user: name={{ item[0] }} priv={{ item[1] }}.*:
*
mysql_user: name={{ item[0] }} priv={{ item[1] }}.*:
ALL password=foo
with_nested:
- [ 'alice', 'bob', 'eve' ]
- [ 'clientdb', 'employeedb', 'providerdb' ]
As with the case of 'with_items' above, you can use previously defined variables. Just specify the variable'sname without templating it with '{{ }}'::
As with the case of 'with_items' above, you can use previously defined variables. Just specify the variable's
name without templating it with '{{ }}'::
- name: here, 'users' contains the above list of employees
mysql_user: name={{ item[0] }} priv={{ item[1] }}.*:
*
mysql_user: name={{ item[0] }} priv={{ item[1] }}.*:
ALL password=foo
with_nested:
- users
- [ 'clientdb', 'employeedb', 'providerdb' ]
...
...
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