2661ea24b7
include_tasks is dynamic and the tasks are either included (or not) at
runtime. This has the advantage that if a "when" keyword excludes the
include_tasks, then all the tasks are excluded as a group.
This is opposed to import_tasks which happen at playbook parse time. The
"when" keyword is inherited by each individual task that was imported.
While the two are functionally equivalent for these use cases,
import_tasks ends up being much slower, since ansible then has to
compute a much larger set of tasks to skip at runtime. Using
include_tasks is much faster, even at small scale (~50 hosts).
This is applying what was done in https://review.opendev.org/697510
to the update/upgrade tasks.
When doing include_tasks, we ensure that we also apply the 'always' tag
so that we have access to use the tags in the included task files. See
[a] for further details.
[a] https://odyssey4.me/2019/11/26/ansible-include-tags.html
Change-Id: I2eab008ca27546acbd2b1275f07bcca0b84b858c
(cherry picked from commit
|
||
---|---|---|
.. | ||
services | ||
container_startup_configs_tasks.yaml | ||
container-puppet.py | ||
container-puppet.sh | ||
deploy-steps-tasks-step-0.j2.yaml | ||
deploy-steps-tasks-step-1.yaml | ||
deploy-steps-tasks.yaml | ||
deploy-steps.j2 | ||
generate-config-tasks.yaml | ||
hiera-steps-tasks.yaml | ||
host-container-puppet-tasks.yaml | ||
post.j2.yaml |