Hi all,
I have a set of Ansible configuration that I intend to use as a Generic template for setting up a Django webserver and related services. This project contains a multitude of roles for configuring various aspects optional services (Nginx, Django, Redis, Postgres, etc.).
I’m trying to find a good way to specify good global default, overridable variables that can be used throughout all of my roles. For example, I’d like to define variables like “app_user” or “app_name” (and many others) that I can use in all of my roles.
Right now, these variables are placed at the top level of my project inside of env_vars/base.yml. I’m thinking that this would be my global default configuration file that would define all of the defaults throughout the project and inform users of what settings are available to override.
Also, the role defaults that I have defined in each role read in variables set in the env_vars/base.yml (my global defaults file), and set local copies of those variables for use in that role’s tasks.