Skip to content

Instantly share code, notes, and snippets.

@gravyboat
Created May 18, 2015 23:07
Show Gist options
  • Save gravyboat/43f9948d9f89b3e21aee to your computer and use it in GitHub Desktop.
Save gravyboat/43f9948d9f89b3e21aee to your computer and use it in GitHub Desktop.
Multiple pillars, had to use | for directories instead of slashes because gist.
app_1:
nginx_url: http://my-awesome-site.com
app_2:
nginx_url: http://my-other-awesome-site.com
base:
'*':
- nginx
- yum
- ruby
- app-1
- app-2
...
server_name: {{ salt['pillar.get']('app_1:nginx_url') }}
...
...
server_name: {{ salt['pillar.get']('app_1:nginx_url') }}
...
app_1_nginx_conf:
file.managed:
- name: /etc/nginx/conf.d/my-awesome-site.conf
- source: salt://app-1/files/my-awesome-site.conf.jinja
- template: jinja
app_2_nginx_conf:
file.managed:
- name: /etc/nginx/conf.d/my-other-awesome-site.conf
- source: salt://app-2/files/my-other-awesome-site.conf.jinja
- template: jinja
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment