Add optional templating to register_site filestags/v0.37.4
- user: root | - user: root | ||||
- group: root | - group: root | ||||
- mode: 775 | - mode: 775 | ||||
{% if 'template' in pillar['apache']['register-site'][site] and 'defaults' in pillar['apache']['register-site'][site] %} | |||||
- template: jinja | |||||
- defaults: | |||||
{% for key, value in pillar['apache']['register-site'][site]['defaults'].iteritems() %} | |||||
{{ key }}: {{ value }} | |||||
{% endfor %} | |||||
{% endif %} | |||||
- watch_in: | - watch_in: | ||||
- cmd: {{ a2modid }} | - cmd: {{ a2modid }} | ||||
- module: apache-reload | - module: apache-reload |
name: 'my name' | name: 'my name' | ||||
path: 'salt://path/to/sites-available/conf/file' | path: 'salt://path/to/sites-available/conf/file' | ||||
state: 'enabled' | state: 'enabled' | ||||
# Optional - use managed file as Jinja Template | |||||
#template: true | |||||
#defaults: | |||||
# custom_var: "default value" | |||||
modules: | modules: | ||||
enabled: # List modules to enable | enabled: # List modules to enable |