Skip to content

Extending the provisioning system

Brad Smith edited this page May 5, 2015 · 1 revision

Adding a new role

A "role" is a collection of Ansible settings and instructions that deploy a particular service or configuration

  1. Create a new ansible role directory in playbooks/roles/
  • Be sure to make any variables defined in your role's defaults/ directory follow the format MODULE_NAME__VAR_NAME (note the two underscores in the middle)
  • Don't forget to define dependencies if your role has them.
  1. Test your role:
  2. Create a localconfig.yml file (use localconfig.yml.defaults as a template)
  3. Set profile to dynamic
  4. In the vars section, add YOU_ROLE_NAME__enabled: true to the vars section
  5. Follow the setup instructions linked above to provision a fresh VM