Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loading of distro vars overrides host vars #43

Open
csmart opened this issue May 17, 2021 · 1 comment
Open

loading of distro vars overrides host vars #43

csmart opened this issue May 17, 2021 · 1 comment

Comments

@csmart
Copy link
Owner

csmart commented May 17, 2021

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.

@csmart
Copy link
Owner Author

csmart commented Sep 12, 2021

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) }}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant