ansible-role-virt-infra
ansible-role-virt-infra copied to clipboard
loading of distro vars overrides host vars
Loading distro specific vars, e.g. vars/centos.yml
overrides any existing vars that have been set on the command line or as a part of the host inventory. For example, virt_infra_security_driver
. Ideally these should only be loaded if a hostvar doesn't exist.
Maybe I should rename the distro defaults with _default
in the name and only use it when the user hasn't defined it without _default
e.g.
Default in distro:
---
virt_infra_default_security_driver: selinux
User sets inventory:
---
virt_infra_security_driver: none
Code does:
"{{ virt_infra_security_driver |default(virt_infra_default_security_driver) }}"