Sometimes, the cleanup process happend AFTER vhosts are installed, which
resulted in no vhost declared.
Parsing declared vhosts in pillar and comparing to present files on the
server allows to remove only unwanted files.
Plus, files are kept in sites-available, and removed only in
sites-enabled.
```bash
Examining nginx/map.jinja of type state
[202] Jinja statement should have spaces before and after: {% statement %}
nginx/map.jinja:175
})%}
[202] Jinja statement should have spaces before and after: {% statement %}
nginx/map.jinja:181
})%}
[202] Jinja statement should have spaces before and after: {% statement %}
nginx/map.jinja:188
})%}
[202] Jinja statement should have spaces before and after: {% statement %}
nginx/map.jinja:192
})%}
[202] Jinja statement should have spaces before and after: {% statement %}
nginx/map.jinja:195
})%}
```
```bash
Examining nginx/certificates.sls of type state
[206] Jinja variables should have spaces before and after: {{ var_name }}
nginx/certificates.sls:40
- contents_pillar: {{salt['pillar.get']('nginx:certificates:{}:public_cert_pillar'.format(domain))}}
[202] Jinja statement should have spaces before and after: {% statement %}
nginx/certificates.sls:47
{% if salt['pillar.get']("nginx:certificates:{}:private_key".format(domain)) or salt['pillar.get']("nginx:certificates:{}:private_key_pillar".format(domain))%}
[206] Jinja variables should have spaces before and after: {{ var_name }}
nginx/certificates.sls:54
- contents_pillar: {{salt['pillar.get']('nginx:certificates:{}:private_key_pillar'.format(domain))}}
```
- currently you're forced to define extra states if you opt to install nginx with passenger,
if you want the same outcome for passenger and nginx installs with equivalent config
- passenger is an extra module on top of nginx, makes no sense to end up with less configuration by default
(...) for snippets filename.
BREAKING CHANGE: Users have to modify their pillar
according to this commit. Users MUST append '.conf' for their
existing managed snippets.
First implementation of TOFS for:
nginx_config, passenger_config, servers_config and snippets
Introduced tplroot on modified files as well
Fixed GH link of nginx.conf file in docs/TOFS_pattern.rst
Fixed test for snippets name pillar
BREAKING CHANGE: all previous `nginx` based configurations must be reviewed;
`nginx.ng` usage must be promoted to `nginx` and any uses of the original
`nginx` will have to be converted.
Improvement - Disable reload of nginx when enabled=False (previously the nginx was always reloaded if settings.config != None; even with enabled=False)