mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #166 from lorin/tasks-not-element
'tasks' should not be preceded by '-' in examples
This commit is contained in:
commit
b9d8ca4f30
1 changed files with 3 additions and 3 deletions
|
@ -276,15 +276,15 @@ A task include file simply contains a flat list of tasks, like so::
|
|||
|
||||
Include directives look like this, and can be mixed in with regular tasks in a playbook::
|
||||
|
||||
- tasks:
|
||||
- include: tasks/foo.yml
|
||||
tasks:
|
||||
- include: tasks/foo.yml
|
||||
|
||||
You can also pass variables into includes. We call this a 'parameterized include'.
|
||||
|
||||
For instance, if deploying multiple wordpress instances, I could
|
||||
contain all of my wordpress tasks in a single wordpress.yml file, and use it like so::
|
||||
|
||||
- tasks:
|
||||
tasks:
|
||||
- include: wordpress.yml user=timmy
|
||||
- include: wordpress.yml user=alice
|
||||
- include: wordpress.yml user=bob
|
||||
|
|
Loading…
Reference in a new issue