In the case of variables that don’t change for an entire infrastructure.
Such as, the ticket queue gets emails at “admin@your.domain.here”
I was wondering if there could be an easier/automatic way to include a ‘global-vars.yml’.
This isn’t so much a feature as it is a time saving and typo preventing device.
I don’t know if it would be better as a configurable,
in ansible.cfg
global_vars=/path/to/repo/global-vars.yml
or as environment variable
export ANSIBLE_GLOBAL_VARS=/path/to/repo/global-vars.yml
or an include base path.
in ansible.cfg
playbooks_home=/path/to/repo
or as environment variable
export ANSIBLE_PLAYBOOKS_HOME=/path/to/repo
The only reason I suggest the latter, is because I remember someone asking about
a base path for includes. I don’t remember what happened to that thread.
I think they wanted to includes tasks?
- include: ${some_basepath_variable}/path/to/task
Perhaps we could solve both problems at once with that idea?
Any interest here?