March 2019
Intermediate to advanced
412 pages
9h 49m
English
Similar to passing data into included files, conditionals can also be passed into included files. This is accomplished by attaching a when statement to the include operator. This conditional does not cause Ansible to evaluate the test to determine whether the file should be included; rather, it instructs Ansible to add the conditional to each and every task within the included file (and any other files the said file may include).
Let's demonstrate this by modifying our first example that includes simple debug statements. We'll add a conditional and pass along some data ...
Read now
Unlock full access