July 2017
Intermediate to advanced
266 pages
6h 36m
English
In addition to play includes, Ansible supports an additional implementation of the include directive. The second implementation is called a task include. Task includes are different from play includes, in that the contents of the included file would only be a YAML file containing a static list of tasks to execute. To implement a task include, we must specify the include directive at the task level. Let's take a look at an example of a task include solution:
# This is an example of a 'play' include- include: myplaybook.yml- name: some play hosts: all tasks: - debug: msg=hello # An Example of a task level include - include: additionaltasks.yml
From this example, we can see the include statement provided would include the ...
Read now
Unlock full access