Skip to content

Instantly share code, notes, and snippets.

@inthecloud247
Created January 18, 2013 23:08
Show Gist options
  • Save inthecloud247/4569472 to your computer and use it in GitHub Desktop.
Save inthecloud247/4569472 to your computer and use it in GitHub Desktop.
my salt top.sls file that handles multiple environments...
#!mako|yaml
base:
'*':
- base.services
- base.states
'environment:localdev':
- match: grain
- localdev.services
- localdev.states
% for role in grains['roles']:
- localdev.role-${role}
% endfor
'environment:dev':
- match: grain
- dev.services
- dev.states
% for role in grains['roles']:
- dev.role-${role}
% endfor
'environment:staging':
- match: grain
- staging.services
- staging.states
% for role in grains['roles']:
- staging.role-${role}
% endfor
'environment:prod':
- match: grain
- prod.services
- prod.states
% for role in grains['roles']:
- prod.role-${role}
% endfor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment