@ -216,15 +216,15 @@ variables from the file "group_vars/ec2_tag_class_webserver" automatically.
Top Level Playbooks Are Separated By Role
Top Level Playbooks Are Separated By Role
`````````````````````````````````````````
`````````````````````````````````````````
In site.yml, we include a playbook that defines our entire infrastructure. Note this is SUPER short, because it's just including
In site.yml, we import a playbook that defines our entire infrastructure. This is a very short example, because it's just importing
some other playbooks. Remember, playbooks are nothing more than lists of plays::
some other playbooks::
---
---
# file: site.yml
# file: site.yml
- include: webservers.yml
- import_plays: webservers.yml
- include: dbservers.yml
- import_plays: dbservers.yml
In a file like webservers.yml (also at the top level), we simply map the configuration of the webservers group to the roles performed by the webservers group. Also notice this is incredibly short. For example::
In a file like webservers.yml (also at the top level), we map the configuration of the webservers group to the roles performed by the webservers group::
@ -138,12 +138,12 @@ While all items listed here will show a deprecation warning message, they still
* Specifying variables at the top level of a task include statement is no longer supported. For example::
* Specifying variables at the top level of a task include statement is no longer supported. For example::
- include: foo.yml
- include_tasks: foo.yml
a: 1
a: 1
Should now be::
Should now be::
- include: foo.yml
- include_tasks: foo.yml
vars:
vars:
a: 1
a: 1
@ -152,11 +152,11 @@ Should now be::
* Tags (or any directive) should no longer be specified with other parameters in a task include. Instead, they should be specified as an option on the task.
* Tags (or any directive) should no longer be specified with other parameters in a task include. Instead, they should be specified as an option on the task.
For example::
For example::
- include: foo.yml tags=a,b,c
- include_tasks: foo.yml tags=a,b,c
Should be::
Should be::
- include: foo.yml
- include_tasks: foo.yml
tags: [a, b, c]
tags: [a, b, c]
* The first_available_file option on tasks has been deprecated. Users should use the with_first_found option or lookup (‘first_found’, …) plugin.
* The first_available_file option on tasks has been deprecated. Users should use the with_first_found option or lookup (‘first_found’, …) plugin.