Commit Graph

341 Commits

Author SHA1 Message Date
N
eef745c232
Merge pull request #292 from SuperTux88/fix-ssl-conf
Refactor ssl.conf for debian
2020-10-15 00:29:56 +01:00
Benjamin Neff
4b79c1dddb
refactor(vhosts): reduce empty lines in standard.tmpl and proxy.tmpl 2020-10-15 00:29:27 +02:00
Benjamin Neff
41a7a83af0
feat(ssl.conf): add SSLSessionTickets to ssl.conf on debian 2020-10-14 22:09:37 +02:00
Benjamin Neff
65043f8a61
fix(ssl.conf): fix pillar keys for SSLStapling in ssl.conf on debian 2020-10-14 22:05:41 +02:00
Benjamin Neff
b99b7b71ad
refactor(ssl.conf): reduce newlines in ssl.conf on debian 2020-10-14 22:04:01 +02:00
N
ef06f5c518
Merge pull request #286 from noelmcloughlin/clean
fix(clean): remove entire apache config directory
2020-10-14 20:42:27 +01:00
N
2e10c8a11b
Merge pull request #287 from noelmcloughlin/nochange
fix(package): avoid unnecessary state change
2020-10-14 20:41:50 +01:00
noelmcloughlin
cac5f357a4 fix(clean): remove entire apache config directory 2020-10-14 20:08:53 +01:00
noelmcloughlin
fb81d8e694 refactor(package): remove unnecessary state 2020-10-14 20:04:19 +01:00
N
9a385b4fcd
Merge pull request #290 from SuperTux88/fix-modules-enable
Fix modules enable
2020-10-14 11:44:05 +01:00
Benjamin Neff
382e053c58
fix(logs): don't change owners of logfiles with salt
The logs are created by apache or logrotate, but salt shouldn't change
permissions of existing logfiles everytime it runs.
2020-10-14 03:43:06 +02:00
Benjamin Neff
2b52e11a8a
fix(vhosts): replace %O with %b in default LogFormat
%O needs mod_logio, which isn't enabled by default everywhere, so it
also shouldn't be used as default fallback LogFormat.
2020-10-14 02:57:00 +02:00
Benjamin Neff
5844322de4
fix(debian): don't execute a2enmod on every run 2020-10-14 00:49:20 +02:00
Benjamin Neff
c17601ee42
fix(debian): fix default moddir on debian 2020-10-13 23:56:20 +02:00
Benjamin Neff
32f05e5a66
fix(config): fix old apache.service usage 2020-10-13 02:42:52 +02:00
Gaëtan Ars
441459e56f fix(package): remove own_default_vhost and debian_full from config.init 2020-10-12 08:57:48 +02:00
Imran Iqbal
7dc0ece4f5
chore: standardise structure [skip ci]
* Automated using https://github.com/myii/ssf-formula/pull/264
2020-10-06 23:26:09 +01:00
noelmcloughlin
47818fc360 refactor(formula): align to template-formula & improve ci features
FEATURE: Archlinux support
FEATURE: Windows support
FEATURE: Enhanced CI/CD
FEATURE: modular states

BREAKING CHANGE: 'apache.sls' converted to new style 'init.ssl'
BREAKING CHANGE: "logrotate.sls" became "config/logrotate.sls"
BREAKING CHANGE: "debian_full.sls" became "config/debian_full.sls"
BREAKING CHANGE: "flags.sls" became "config/flags.sls"
BREAKING CHANGE: "manage_security" became "config/manage_security.sls"
BREAKING CHANGE: "mod_*.sls" became "config/mod_*.sls"
BREAKING CHANGE: "no_default_host.sls" became "config/no_default_host.sls"
BREAKING CHANGE: "own_default_host.sls" became "config/own_default_host.sls"
BREAKING CHANGE: "register_site.sls" became "config/register_site.sls"
BREAKING CHANGE: "server_status.sls" became "config/server_status.sls"
BREAKING CHANGE: "vhosts/" became "config/vhosts/"
BREAKING CHANGE: "mod_security/" became "config/mod_security/"

NOT-BREAKING CHANGE: 'config.sls' became 'config/init.sls'
NOT-BREAKING CHANGE: 'uninstall.sls' symlinked to 'clean.sls'
2020-10-05 14:24:15 +01:00
Javier Bértoli
632802a5a9 fix(server-status): enable module in Debian family 2020-07-19 09:26:39 -03:00
Javier Bértoli
eafa4196d9 fix(server-status): manage module in debian 2020-07-18 07:28:58 -03:00
Imran Iqbal
5a186de875
Merge pull request #282 from bawuenet/script_alias
feat: Add support for ScriptAlias in standard vhost
2020-07-16 20:01:05 +01:00
Andreas Thienemann
b88b437308 feat(vhosts/standard): add support for ScriptAlias in standard vhost
The standard vhost currently handles a regular Alias configuration
statement, but not the related ScriptAlias.
Add this.
2020-07-16 20:52:22 +02:00
Andreas Thienemann
648f589cc3
feat(redhat/apache-2.x.config.jinja): allow override of default_charset
The current Red Hat config allows to set DefaultCharset to a value.
In certain situations it is necessary to leave it unconfigured thouguh.

Make the content optional, if the value of apache.default_charset is None,
the item is skipped. Otherwise it defaults to UTF-8.
2020-07-16 19:43:54 +01:00
Yoda-BZH
88373e38f5
fix(vhosts/cleanup): check sites-enabled dir exists before listing it
Co-authored-by: Tristan Charbonneau <tcharbonneau@oceanet-technology.com>

Fix #278
2020-06-21 23:37:12 +01:00
Andreas Thienemann
5591be26fd
fix(mod_ssl): update mod_ssl package variable to prevent clashes
The mod_ssl package name could be overridden in apache:lookup:mod_ssl.
Due to the way lookup keys are merged into the main apache dictionary,
the package name clashed with the mod_ssl configuration defined under
apache:mod_ssl.

Fix that by renaming the mod_ssl package variable to mod_ssl_pkg.

Drive-By: Add mod_ssl_pkg to the pillar.example file.
2020-04-02 17:29:06 +01:00
Sergio Cambra
1ed69f6c6f fix(debian): generate remoteip conf before a2enconf 2020-01-27 22:43:05 +01:00
Chris Horne
36ad2b2442 fix(redhat): add user & group lookup to configs 2019-12-20 17:38:01 +00:00
Imran Iqbal
e5579930e7
Merge pull request #272 from dimitry-unified-streaming/fix-mpm_prefork-jinja
fix(mod_mpm): cast to int to avoid Jinja type mismatch error
2019-12-20 16:52:13 +00:00
mcarlton00
a3c0022d79 feat(server-status): allow remote servers to reach server-status page 2019-12-20 11:20:26 -05:00
Dimitry Andric
21045c7a7b fix(mod_mpm): cast to int to avoid Jinja type mismatch error
This fixes the following error when Jinja tries to process
`mpm_prefork.conf.jinja` or `00-mpm.conf.jinja`, when it processes the
`max_request_workers` comparison:

```
Unable to manage file: Jinja error: '>=' not supported between instances of 'str' and 'int'
[...]
<IfModule mpm_prefork_module>
  StartServers {{ mpm_param['start_servers'] | d('5') }}
  MaxRequestWorkers {{ mpm_param['max_request_workers'] | d('150') }}
{%- if mpm_param['max_request_workers'] | d('150') >= 256 %}    <======================
  ServerLimit {{ mpm_param['max_request_workers'] | d('150') }}
{%- endif %}
  MinSpareServers {{ mpm_param['min_spare_servers'] | d('5') }}
  MaxSpareServers {{ mpm_param['max_spare_servers'] | d('10') }}
  MaxConnectionsPerChild {{ mpm_param['max_connections_per_child'] | d('0') }}
```

Add filters that convert the values to an int first.
2019-12-20 13:24:37 +01:00
Niels Abspoel
505ce0332b
Merge pull request #269 from scambra/patch-modules
fix duplicated ID
2019-11-07 17:49:43 +01:00
Gino Naumann
fba8d21794 fix(mod_perl2.sls): fix a2enmod perl2 error 2019-11-04 17:23:25 +01:00
Sergio Cambra
57afd71627 fix(apache/modules.sls): fix duplicated ID 2019-10-30 12:53:39 +01:00
Imran Iqbal
1bad58d899
fix(vhosts/standard.tmpl): fix salt-lint errors
```bash
Examining apache/vhosts/standard.tmpl of type state
[206] Jinja variables should have spaces before and after: {{ var_name }}
apache/vhosts/standard.tmpl:46
<VirtualHost {% for intf in vals.interfaces %} {{intf}}:{{ vals.port }}{% endfor -%}>

[206] Jinja variables should have spaces before and after: {{ var_name }}
apache/vhosts/standard.tmpl:70
    {% if site.get('SSLCertificateChainFile') %}SSLCertificateChainFile {{ site.SSLCertificateChainFile}}{% endif %}

[201] Trailing whitespace
apache/vhosts/standard.tmpl:72

[206] Jinja variables should have spaces before and after: {{ var_name }}
apache/vhosts/standard.tmpl:96
        {% if dvals.get('Require') != False %}Require {{dvals.Require}}{% endif %}

[206] Jinja variables should have spaces before and after: {{ var_name }}
apache/vhosts/standard.tmpl:120
        {%- if lvals.get('Require') != False %}Require {{lvals.Require}}{% endif %}
```
2019-10-17 08:32:32 +01:00
Imran Iqbal
0a41b193da
fix(vhosts/redirect.tmpl): fix salt-lint errors
```bash
Examining apache/vhosts/redirect.tmpl of type state
[201] Trailing whitespace
apache/vhosts/redirect.tmpl:23

[206] Jinja variables should have spaces before and after: {{ var_name }}
apache/vhosts/redirect.tmpl:28
<VirtualHost {%- for intf in vals.interfaces %} {{intf}}:{{ vals.port }}{% endfor -%}>

[201] Trailing whitespace
apache/vhosts/redirect.tmpl:47
```
2019-10-17 08:32:32 +01:00
Imran Iqbal
e7c9fbb152
fix(vhosts/proxy.tmpl): fix salt-lint errors
```bash
Examining apache/vhosts/proxy.tmpl of type state
[206] Jinja variables should have spaces before and after: {{ var_name }}
apache/vhosts/proxy.tmpl:38
<VirtualHost {%- for intf in vals.interfaces %} {{intf}}:{{ vals.port }}{% endfor -%}>

[206] Jinja variables should have spaces before and after: {{ var_name }}
apache/vhosts/proxy.tmpl:53
    {% if site.get('SSLCertificateChainFile') %}SSLCertificateChainFile {{ site.SSLCertificateChainFile}}{% endif %}

[206] Jinja variables should have spaces before and after: {{ var_name }}
apache/vhosts/proxy.tmpl:85
      {%- if lvals.get('Require') != False %}Require {{lvals.Require}}{% endif %}

[206] Jinja variables should have spaces before and after: {{ var_name }}
apache/vhosts/proxy.tmpl:102
      {%- if lmvals.get('Require') != False %}Require {{lmvals.Require}}{% endif %}
```
2019-10-17 08:32:31 +01:00
Imran Iqbal
146dc6702a
fix(vhosts/minimal.tmpl): fix salt-lint errors
```bash
Examining apache/vhosts/minimal.tmpl of type state
[206] Jinja variables should have spaces before and after: {{ var_name }}
apache/vhosts/minimal.tmpl:25
<VirtualHost {% for intf in vals.interfaces %} {{intf}}:{{ vals.port }}{% endfor -%}>
```
2019-10-17 08:32:31 +01:00
Imran Iqbal
b0bbd0b91d
fix(vhosts/cleanup.sls): fix salt-lint errors
```bash
Examining apache/vhosts/cleanup.sls of type state
[206] Jinja variables should have spaces before and after: {{ var_name }}
apache/vhosts/cleanup.sls:29
    - onlyif: "test -L {{ dirpath}}/{{ filename }} || test -f {{ dirpath}}/{{ filename }}"
```
2019-10-17 08:32:31 +01:00
Imran Iqbal
ed7dc7b411
fix(uninstall.sls): fix salt-lint errors
```bash
Examining apache/uninstall.sls of type state
[201] Trailing whitespace
apache/uninstall.sls:2
```
2019-10-17 08:32:31 +01:00
Imran Iqbal
da9a59225a
fix(server_status.sls): fix salt-lint errors
```bash
Examining apache/server_status.sls of type state
[206] Jinja variables should have spaces before and after: {{ var_name }}
apache/server_status.sls:7
{{apache.confdir}}/server-status{{apache.confext}}:
```
2019-10-17 08:32:31 +01:00
Imran Iqbal
55d11f8293
fix(modules.sls): fix salt-lint errors
```bash
Examining apache/modules.sls of type state
[201] Trailing whitespace
apache/modules.sls:49

[201] Trailing whitespace
apache/modules.sls:84
```
2019-10-17 08:32:31 +01:00
Imran Iqbal
e55ef9b3ee
fix(mod_geoip.sls): fix salt-lint errors
```bash
Examining apache/mod_geoip.sls of type state
[201] Trailing whitespace
apache/mod_geoip.sls:30
    - source:
```
2019-10-17 08:32:30 +01:00
Imran Iqbal
d011324bd2
fix(map.jinja): fix salt-lint errors
```bash
Examining apache/map.jinja of type state
[209] Jinja comment should have spaces before and after: {# comment #}
apache/map.jinja:22
{## Merge the apache pillar ##}
```
2019-10-17 08:32:30 +01:00
Imran Iqbal
8465eb47e0
fix(init.sls): fix salt-lint errors
```bash
Examining apache/init.sls of type state
[206] Jinja variables should have spaces before and after: {{ var_name }}
apache/init.sls:15
  service.{{apache.service_state}}:

[206] Jinja variables should have spaces before and after: {{ var_name }}
apache/init.sls:30
    - cmd: {{apache.custom_reload_command|default('apachectl graceful')}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
apache/init.sls:41
    - cmd: {{apache.custom_reload_command|default('apachectl graceful')}}
```
2019-10-17 08:32:30 +01:00
Imran Iqbal
a146c59763
fix(flags.sls): fix salt-lint errors
```bash
Examining apache/flags.sls of type state
[201] Trailing whitespace
apache/flags.sls:7
```
2019-10-17 08:32:30 +01:00
Imran Iqbal
2a79d05945
fix(modsecurity.conf.jinja): fix salt-lint errors
```bash
Examining apache/files/RedHat/modsecurity.conf.jinja of type state
[201] Trailing whitespace
apache/files/RedHat/modsecurity.conf.jinja:26
```
2019-10-17 08:32:30 +01:00
Imran Iqbal
e2c1c2e66f
fix(apache-2.4.config.jinja): fix salt-lint errors
```bash
Examining apache/files/FreeBSD/apache-2.4.config.jinja of type state
[201] Trailing whitespace
apache/files/FreeBSD/apache-2.4.config.jinja:171
```
2019-10-17 08:32:30 +01:00
Imran Iqbal
f4045efeff
fix(apache-2.2.config.jinja): fix salt-lint errors
```bash
Examining apache/files/Debian/apache-2.2.config.jinja of type state
[201] Trailing whitespace
apache/files/Debian/apache-2.2.config.jinja:119
    MaxSpareThreads      75

[201] Trailing whitespace
apache/files/Debian/apache-2.2.config.jinja:136
    MaxSpareThreads      75
```
2019-10-17 08:32:30 +01:00
Imran Iqbal
97f6ead9f4
fix(yamllint): fix all errors
```bash
apache-formula$ yamllint -s .
./pillar.example
  2:1       warning  missing document start "---"  (document-start)
  5:26      warning  truthy value should be one of [false, true]  (truthy)
  50:18     warning  too few spaces before comment  (comments)
  51:16     warning  truthy value should be one of [false, true]  (truthy)
  52:57     warning  too few spaces before comment  (comments)
  52:89     error    line too long (104 > 88 characters)  (line-length)
  67:33     warning  truthy value should be one of [false, true]  (truthy)
  67:38     warning  too few spaces before comment  (comments)
  69:31     warning  too few spaces before comment  (comments)
  70:8      warning  missing starting space in comment  (comments)
  75:53     warning  too few spaces before comment  (comments)
  75:89     error    line too long (98 > 88 characters)  (line-length)
  76:55     warning  too few spaces before comment  (comments)
  76:89     error    line too long (101 > 88 characters)  (line-length)
  78:50     warning  too few spaces before comment  (comments)
  79:89     error    line too long (95 > 88 characters)  (line-length)
  82:47     warning  too few spaces before comment  (comments)
  83:54     warning  too few spaces before comment  (comments)
  83:89     error    line too long (100 > 88 characters)  (line-length)
  84:58     warning  too few spaces before comment  (comments)
  84:89     error    line too long (109 > 88 characters)  (line-length)
  93:32     warning  too few spaces before comment  (comments)
  100:89    error    line too long (105 > 88 characters)  (line-length)
  101:33    error    trailing spaces  (trailing-spaces)
  102:16    warning  truthy value should be one of [false, true]  (truthy)
  231:20    warning  truthy value should be one of [false, true]  (truthy)
  242:32    warning  too few spaces before comment  (comments)
  249:20    warning  truthy value should be one of [false, true]  (truthy)
  254:20    warning  truthy value should be one of [false, true]  (truthy)
  260:21    warning  truthy value should be one of [false, true]  (truthy)
  283:8     warning  missing starting space in comment  (comments)
  284:8     warning  missing starting space in comment  (comments)
  297:15    warning  too few spaces before comment  (comments)
  328:18    warning  truthy value should be one of [false, true]  (truthy)
  330:20    warning  truthy value should be one of [false, true]  (truthy)
  342:15    error    empty value in block mapping  (empty-values)
  345:18    warning  truthy value should be one of [false, true]  (truthy)
  348:18    warning  truthy value should be one of [false, true]  (truthy)
  355:18    warning  truthy value should be one of [false, true]  (truthy)
  358:89    error    line too long (91 > 88 characters)  (line-length)
  359:26    warning  truthy value should be one of [false, true]  (truthy)
  362:89    error    line too long (99 > 88 characters)  (line-length)
  365:89    error    line too long (267 > 88 characters)  (line-length)
  367:21    warning  truthy value should be one of [false, true]  (truthy)
  369:26    warning  truthy value should be one of [false, true]  (truthy)
  371:1     error    too many blank lines (1 > 0)  (empty-lines)

./apache/osfingermap.yaml
  3:1       warning  missing document start "---"  (document-start)

./apache/modsecurity.yaml
  4:1       warning  missing document start "---"  (document-start)
  6:18      warning  truthy value should be one of [false, true]  (truthy)
  7:20      warning  truthy value should be one of [false, true]  (truthy)
  14:18     warning  truthy value should be one of [false, true]  (truthy)
  15:20     warning  truthy value should be one of [false, true]  (truthy)
  22:18     warning  truthy value should be one of [false, true]  (truthy)
  23:20     warning  truthy value should be one of [false, true]  (truthy)

./apache/defaults.yaml
  4:1       warning  missing document start "---"  (document-start)
  5:26      warning  truthy value should be one of [false, true]  (truthy)
  7:19      warning  truthy value should be one of [false, true]  (truthy)
  10:18     warning  truthy value should be one of [false, true]  (truthy)
  11:20     warning  truthy value should be one of [false, true]  (truthy)

./apache/oscodenamemap.yaml
  4:1       warning  missing document start "---"  (document-start)
  4:8       error    trailing spaces  (trailing-spaces)
  9:8       error    trailing spaces  (trailing-spaces)
  14:7      error    trailing spaces  (trailing-spaces)
  19:6      error    trailing spaces  (trailing-spaces)
  24:8      error    trailing spaces  (trailing-spaces)
  29:9      error    trailing spaces  (trailing-spaces)
  34:7      error    trailing spaces  (trailing-spaces)
  39:8      error    trailing spaces  (trailing-spaces)
  44:8      error    trailing spaces  (trailing-spaces)
  50:9      error    trailing spaces  (trailing-spaces)
  61:1      error    too many blank lines (1 > 0)  (empty-lines)

./apache/osfamilymap.yaml
  4:1       warning  missing document start "---"  (document-start)
  16:89     error    line too long (104 > 88 characters)  (line-length)
  43:89     error    line too long (105 > 88 characters)  (line-length)
  56:16     warning  truthy value should be one of [false, true]  (truthy)
  114:11    error    empty value in block mapping  (empty-values)
  114:11    error    trailing spaces  (trailing-spaces)

./test/salt/pillar/default.sls
  5:26      warning  truthy value should be one of [false, true]  (truthy)
  7:18      warning  truthy value should be one of [false, true]  (truthy)
  8:20      warning  truthy value should be one of [false, true]  (truthy)
```
2019-10-17 08:32:30 +01:00
Sergio Cambra
9a1b1d9b26 Patch upload progress (#267)
* Include the mod_* states in apache.modules for Debian hosts

* upload progress module for debian
2019-09-26 17:57:24 +02:00