March 2019
Intermediate to advanced
412 pages
9h 49m
English
Sometimes, we want to split out a set of tasks but have those tasks act slightly differently depending on variable data. The include operator allows us to define and override variable data at the time of inclusion. The scope of the definition is only within the included task file (and any other files that file may itself include).
To illustrate this capability, let's create a new scenario in which we need to touch a couple of files, each in their own directory path. Instead of writing two file tasks for each file (one to create the directory and another to touch the file), we'll create a task file with each task that will use variable names in the tasks. Then, we'll include the task file twice, each ...
Read now
Unlock full access