Przeglądaj źródła

Merge pull request #44 from RyPeck/feature/optional_template_register_sites

Add optional templating to register_site files
tags/v0.37.4
Nitin Madhok 9 lat temu
rodzic
commit
241f2be82e
2 zmienionych plików z 11 dodań i 0 usunięć
  1. +7
    -0
      apache/register_site.sls
  2. +4
    -0
      pillar.example

+ 7
- 0
apache/register_site.sls Wyświetl plik

@@ -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

+ 4
- 0
pillar.example Wyświetl plik

@@ -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

Ładowanie…
Anuluj
Zapisz