diff --git a/pillar.example b/pillar.example index e768da7..f55c711 100644 --- a/pillar.example +++ b/pillar.example @@ -14,27 +14,40 @@ apache: # ``apache.vhosts`` formula additional configuration: sites: - # Default values below are used unless disabled by setting to 'False'. - example.com: # must be unique; used as an ID declaration in Salt; also passed to the template context as {{ id }} + example.net: + template_file: salt://apache/vhosts/minimal.tmpl + + example.com: # must be unique; used as an ID declaration in Salt. template_file: salt://apache/vhosts/standard.tmpl + + ####################### DEFAULT VALUES BELOW ############################ + # NOTE: the values below are simply default settings that *can* be + # overridden and are not required in order to use this formula to create + # vhost entries. + # + # Do not copy the values below into your Pillar unless you intend to + # modify these vaules. + ####################### DEFAULT VALUES BELOW ############################ template_engine: jinja interface: '*' port: '80' - ServerName: {{ id }} # uses the unique ID above unless specified - ServerAlias: www.{{ id }} + ServerName: example.com # uses the unique ID above unless specified + ServerAlias: www.example.com - ServerAdmin: webmaster@{{ id }} + ServerAdmin: webmaster@example.com LogLevel: warn - ErrorLog: {{ logdir }}/{{ id }}-error.log # E.g.: /var/log/apache2/example.com-error.log - CustomLog: {{ logdir }}/{{ id }}-access.log # E.g.: /var/log/apache2/example.com-access.log + ErrorLog: /path/to/logs/example.com-error.log # E.g.: /var/log/apache2/example.com-error.log + CustomLog: /path/to/logs/example.com-access.log # E.g.: /var/log/apache2/example.com-access.log - DocumentRoot: {{ wwwdir }}/{{ id }} # E.g., /var/www/example.com + DocumentRoot: /path/to/www/dir/example.com # E.g., /var/www/example.com Directory: - default: # "default" is a special case; Adds ``{{ wwwdir }}/{{ id }}`` e.g.: /var/www/example.com + # "default" is a special case; Adds ``/path/to/www/dir/example.com`` + # E.g.: /var/www/example.com + default: Options: -Indexes FollowSymLinks Order: allow,deny Allow: from all @@ -47,13 +60,10 @@ apache: Additional config as a multi-line string here - example.net: - template_file: salt://apache/vhosts/minimal.tmpl - # ``apache.debian_full`` formula additional configuration: register-site: # any name as an array index, and you can duplicate this section - {{UNQIUE}}: + UNIQUE_VALUE_HERE: name: 'my name' path: 'salt://path/to/sites-available/conf/file' state: 'enabled'