Skip to content

Instantly share code, notes, and snippets.

Created January 11, 2014 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/8368773 to your computer and use it in GitHub Desktop.
Save anonymous/8368773 to your computer and use it in GitHub Desktop.
project/update/redirector
{% set project = grains['project'] %}
project_update_redirector:
module:
- run
- name: publish.publish
- tgt: 'roles:redirector'
- m_fun: state.sls
- arg: vhost pillar='{"customer": "{{ project }}"}' ### Also tried to quote args using "" or ''
- expr_form: grain
--
vhost
{% set project = pillar.get('project') %}
vhost_{{ project }}:
file:
- managed
- name: /etc/nginx/conf.d/{{ project }}.conf
- source: salt://vhost/vhost
- template: jinja
- makedirs: True
- dir_mode: 755
- user: root
- group: root
- mode: 644
- defaults:
project: {{ project }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment