Jay Taylor's notes
back to listing indexedx/configuration
[web search]
Original source (github.com)
Clipped on: 2016-02-24
Skip to content
Ansible variable conventions and overriding defaults
axilleas edited this page on Nov 28, 2014
·
4 revisions
Pages 24
- Home
- Ansible Coding Conventions
- Ansible variable conventions and overriding defaults
- Creating Django based Independently Deployable Applications (IDAs)
- edX AWS Cloudformation Template
- edX Developer Stack
- edX Full Stack
- edx Full stack installation using Vagrant Virtualbox
- edX Managing the Full Stack
- edX Managing the Production Stack
- edX proxy instructions
- edX Ubuntu 12.04 64 bit Installation
- Hosting edX in Production
- Installing Vagrant
- Jenkins build_ami
- Show 9 more pages…
Variable Precedence (version 1.2)
1) Variables defined in the play under vars_files
normalvars_files:
- "/path/to/var/file"
normal
2) Variables defined in <role>/vars/main.yml
3) Variables passed in on the command line
normalansible-playbook ... -e "test_var=foo"
normal
4) Variables defined in the play under vars
normalvars:
test_var: foo
normal
5) Variables defined in group_vars/
edX Variable conventions
Role variables
Default variables for roles should all be defined in <role>/vars/main.yml
file associated with the role.
This is currently not the lowest priority definition, in fact it's the number (2) in precedence. Ansible 1.3 will be introducing new role default vars which will allow us to