Remove the use of vars and hostvars wherever possible.

`vars` operates inconsistently in different combinations of
Ansible (full/base/core) and Python versions.

Variables are now instead explicitly loaded under a subkey, which also removes
the need for filtering and makes access more explicit and semantic.
This commit is contained in:
Sašo Stanovnik
2021-06-03 16:10:00 +02:00
parent 1fb033cbc4
commit 3188c5742f
5 changed files with 63 additions and 59 deletions

View File

@@ -2,7 +2,8 @@
- name: include all demo vars from install_demo roll
include_vars:
dir: "vars"
name: job_template_definitions
- name: will load vars from adjacent vars
- name: will load vars
debug:
msg: "variables loaded from install_demo role"
msg: "variables loaded from install_demo role into job_template_definitions"