mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #4203 from candeira/with_nested
fix documentation examples for with_nested
This commit is contained in:
commit
0ebc29d3d4
1 changed files with 3 additions and 3 deletions
|
@ -500,7 +500,7 @@ 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' ]
|
||||
|
@ -508,7 +508,7 @@ Loops can be nested as well::
|
|||
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' ]
|
||||
|
|
Loading…
Reference in a new issue