Skip to content

Instantly share code, notes, and snippets.

@dnd
Created May 22, 2014 20:37
Show Gist options
  • Save dnd/a454e680bc519c8e7463 to your computer and use it in GitHub Desktop.
Save dnd/a454e680bc519c8e7463 to your computer and use it in GitHub Desktop.
include:
- appbase:
- context:
appname: app1
# do stuff specific to this app
include:
- appbase:
- context:
appname: app2
# do stuff specific to this app
{% set app = pillar['applications'][appname] -%}
#maybe since it would probably have to come in as a global to jinja, under a context dict
{% set app = pillar['applications'][context['appname']] -%}
{% set app_home = '/var/www/' + app['name'] -%}
{{app['name']}}-user:
user.present:
- name: app['user']
- home: {{app_home}}
{{app_home}}:
file.directory:
- makedirs: True
{{app['name']}}-dependencies:
pkg.installed:
- names: {{app['dependencies']}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment