diff --git a/apache/register_site.sls b/apache/register_site.sls index 3f7d0d8..00a8135 100644 --- a/apache/register_site.sls +++ b/apache/register_site.sls @@ -38,6 +38,13 @@ - user: root - group: root - 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: - cmd: {{ a2modid }} - module: apache-reload diff --git a/pillar.example b/pillar.example index 87d104d..a04a9e3 100644 --- a/pillar.example +++ b/pillar.example @@ -81,6 +81,10 @@ apache: name: 'my name' path: 'salt://path/to/sites-available/conf/file' state: 'enabled' + # Optional - use managed file as Jinja Template + #template: true + #defaults: + # custom_var: "default value" modules: enabled: # List modules to enable