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
2aae5e53
Commit
2aae5e53
authored
Sep 22, 2013
by
Javier Candeira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix examples for with_nested
parent
27b5c2e2
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 @
2aae5e53
...
...
@@ -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