Commit Graph

75 Commits

Author SHA1 Message Date
b4804e40fe
feat(opensuse): optional openSUSE devel repository
All modern openSUSE releases (Leap 15.x, Tumbleweed) ship nginx in the
default repositories. The devel repository should not be used unless the
user knows what they are doing.

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
2023-02-05 03:14:46 +01:00
23df36ded9
feat(servers_config): enable configs by default
Don't require `enabled: true` - helps distributions without
separate available/enabled directories and prevents error:
"Rendering SLS 'production:nginx.servers' failed: Jinja variable 'list
object' has no attribute 'enabled'"

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
2023-02-04 14:49:28 +01:00
Javier Bértoli
622d22f971 feat(servers_config): add require statement to manage dependencies
Also, check config before applying
2021-04-28 09:37:34 -03:00
Javier Bértoli
b396b24fe4 feat(config): validate config before applying 2021-03-11 13:27:14 -03:00
fthenard
a373bdab79 feat(add purge option): purge sites option 2020-03-30 14:52:05 +02:00
Imran Iqbal
714f547e9a
docs(pillar.example): fix TOFS comment to explain the default path [skip ci]
* Replace the Jinja brackets to avoid evaluating when `pillar.example` is
  used from Kitchen
* References:
  - https://github.com/saltstack-formulas/libvirt-formula/pull/60#issuecomment-537965254
  - https://github.com/saltstack-formulas/libvirt-formula/pull/60#issuecomment-537988138
2019-10-03 19:27:37 +01:00
Imran Iqbal
3d48b1b6bb
ci(yamllint): add rule empty-values & use new yaml-files setting
* Semi-automated using https://github.com/myii/ssf-formula/pull/27
* Fix errors shown below:

```bash
nginx-formula$ yamllint -s .
./pillar.example
  146:56    error    empty value in block mapping  (empty-values)
  147:76    error    empty value in block mapping  (empty-values)
  148:59    error    empty value in block mapping  (empty-values)
  150:22    error    empty value in block mapping  (empty-values)
  151:39    error    empty value in block mapping  (empty-values)
  152:39    error    empty value in block mapping  (empty-values)
  153:39    error    empty value in block mapping  (empty-values)
```
2019-09-10 22:44:25 +01:00
Imran Iqbal
6b7d1fe453
feat(yamllint): include for this repo and apply rules throughout
* Semi-automated using `ssf-formula` (v0.5.0)
* Fix errors shown below:

```bash
nginx-formula$ $(grep "\- yamllint" .travis.yml | sed -e "s:^\s\+-\s\(.*\):\1:")
pillar.example
  5:1       warning  missing document start "---"  (document-start)
  6:89      error    line too long (110 > 88 characters)  (line-length)
  7:89      error    line too long (99 > 88 characters)  (line-length)
  19:89     error    line too long (132 > 88 characters)  (line-length)
  35:25     warning  truthy value should be one of [false, true]  (truthy)
  36:89     error    line too long (106 > 88 characters)  (line-length)
  40:89     error    line too long (115 > 88 characters)  (line-length)
  43:16     warning  truthy value should be one of [false, true]  (truthy)
  44:89     error    line too long (105 > 88 characters)  (line-length)
  48:16     warning  truthy value should be one of [false, true]  (truthy)
  54:14     warning  too few spaces before comment  (comments)
  57:13     warning  truthy value should be one of [false, true]  (truthy)
  57:18     warning  too few spaces before comment  (comments)
  58:14     warning  too few spaces before comment  (comments)
  60:5      warning  missing starting space in comment  (comments)
  60:89     error    line too long (96 > 88 characters)  (line-length)
  61:89     error    line too long (90 > 88 characters)  (line-length)
  62:89     error    line too long (90 > 88 characters)  (line-length)
  63:89     error    line too long (94 > 88 characters)  (line-length)
  64:5      warning  missing starting space in comment  (comments)
  64:89     error    line too long (96 > 88 characters)  (line-length)
  68:9      error    wrong indentation: expected 10 but found 8  (indentation)
  76:9      error    wrong indentation: expected 10 but found 8  (indentation)
  86:9      error    wrong indentation: expected 10 but found 8  (indentation)
  90:14     warning  too few spaces before comment  (comments)
  90:89     error    line too long (104 > 88 characters)  (line-length)
  92:6      warning  missing starting space in comment  (comments)
  92:89     error    line too long (106 > 88 characters)  (line-length)
  94:89     error    line too long (104 > 88 characters)  (line-length)
  97:6      warning  missing starting space in comment  (comments)
  97:89     error    line too long (106 > 88 characters)  (line-length)
  100:62    warning  too few spaces before comment  (comments)
  100:89    error    line too long (121 > 88 characters)  (line-length)
  101:62    warning  comment not indented like content  (comments-indentation)
  101:89    error    line too long (116 > 88 characters)  (line-length)
  102:89    error    line too long (112 > 88 characters)  (line-length)
  103:89    error    line too long (99 > 88 characters)  (line-length)
  105:89    error    line too long (124 > 88 characters)  (line-length)
  106:8     warning  missing starting space in comment  (comments)
  106:89    error    line too long (117 > 88 characters)  (line-length)
  112:89    error    line too long (97 > 88 characters)  (line-length)
  120:31    warning  missing starting space in comment  (comments)
  123:89    error    line too long (95 > 88 characters)  (line-length)
  127:13    error    wrong indentation: expected 14 but found 12  (indentation)
  151:33    warning  too few spaces before comment  (comments)
  151:89    error    line too long (94 > 88 characters)  (line-length)
  152:22    warning  too few spaces before comment  (comments)
  152:89    error    line too long (90 > 88 characters)  (line-length)
  153:21    warning  too few spaces before comment  (comments)
  153:89    error    line too long (101 > 88 characters)  (line-length)
  154:22    warning  too few spaces before comment  (comments)
  155:18    warning  too few spaces before comment  (comments)
  155:89    error    line too long (103 > 88 characters)  (line-length)
  163:89    error    line too long (100 > 88 characters)  (line-length)
  164:89    error    line too long (106 > 88 characters)  (line-length)
  165:18    warning  truthy value should be one of [false, true]  (truthy)
  167:89    error    line too long (109 > 88 characters)  (line-length)
  170:10    warning  missing starting space in comment  (comments)
  172:10    warning  missing starting space in comment  (comments)
  172:89    error    line too long (120 > 88 characters)  (line-length)
  173:10    warning  missing starting space in comment  (comments)
  173:89    error    line too long (118 > 88 characters)  (line-length)
  174:89    error    line too long (120 > 88 characters)  (line-length)
  175:20    warning  truthy value should be one of [false, true]  (truthy)
  175:89    error    line too long (102 > 88 characters)  (line-length)
  177:89    error    line too long (100 > 88 characters)  (line-length)
  178:89    error    line too long (101 > 88 characters)  (line-length)
  182:13    error    wrong indentation: expected 14 but found 12  (indentation)
  184:15    error    wrong indentation: expected 16 but found 14  (indentation)
  186:15    error    wrong indentation: expected 16 but found 14  (indentation)
  189:15    error    wrong indentation: expected 16 but found 14  (indentation)
  193:9     warning  comment not indented like content  (comments-indentation)
  196:13    error    wrong indentation: expected 14 but found 12  (indentation)
  198:15    error    wrong indentation: expected 16 but found 14  (indentation)
  202:15    error    wrong indentation: expected 16 but found 14  (indentation)
  206:9     warning  comment not indented like content  (comments-indentation)
  218:16    warning  too few spaces before comment  (comments)
  218:89    error    line too long (96 > 88 characters)  (line-length)
  219:18    warning  truthy value should be one of [false, true]  (truthy)
  223:57    warning  too few spaces before comment  (comments)
  223:89    error    line too long (111 > 88 characters)  (line-length)
  224:57    warning  comment not indented like content  (comments-indentation)
  224:89    error    line too long (118 > 88 characters)  (line-length)
  226:89    error    line too long (90 > 88 characters)  (line-length)
  236:18    warning  truthy value should be one of [false, true]  (truthy)
  245:89    error    line too long (108 > 88 characters)  (line-length)
  252:89    error    line too long (104 > 88 characters)  (line-length)
  305:89    error    line too long (115 > 88 characters)  (line-length)
  306:32    error    trailing spaces  (trailing-spaces)

test/salt/default/pillar/nginx.sls
  1:1       error    too many blank lines (1 > 0)  (empty-lines)
  7:1       warning  missing document start "---"  (document-start)
  11:9      error    wrong indentation: expected 10 but found 8  (indentation)
  23:18     warning  truthy value should be one of [false, true]  (truthy)
  24:18     warning  truthy value should be one of [false, true]  (truthy)
  28:18     warning  truthy value should be one of [false, true]  (truthy)
  31:13     error    wrong indentation: expected 14 but found 12  (indentation)
  33:15     error    wrong indentation: expected 16 but found 14  (indentation)
  36:15     error    wrong indentation: expected 16 but found 14  (indentation)
  38:1      error    too many blank lines (1 > 0)  (empty-lines)
```
2019-08-12 14:40:12 +01:00
Hannah Wolfe
c76ffa660e
tofs: include path pattern with defaults in docs 2019-07-22 19:40:53 +01:00
nb
aa87721bc2 fix(snippets): removed appending of ".conf"
(...) for snippets filename.
BREAKING CHANGE: Users have to modify their pillar
according to this commit. Users MUST append '.conf' for their
existing managed snippets.
2019-06-20 00:11:31 +11:00
Sammy
d5262ea5df feat(tofs): first implemetation + tplroot
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
2019-06-04 08:57:21 +11:00
Eric Veiras Galisson
0fc507055d refactor: replace old nginx with nginx.ng
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.
2019-05-12 17:13:17 +01:00
Garrett W
95ff308e7e feat(pillar.example): add stock log_format 2019-04-26 16:38:17 +01:00
Garrett W
62e8ac0b33 Pillar fixes (#217)
Squashed from:

* pillar.example: an include was missing a colon
* pillar.example: 2 directives not indented properly
* pillar.example: added the stock log_format
* pillar.example: make log path match map.jinja
* pillar.example: worker_connections value from latest mainline nginx
* pillar.example: fixed other uses of include
* pillar.example: corrected formatting
* pillar.example: corrected log_format
* pillar.example: reset log_format to try another day
2019-04-11 17:45:48 +01:00
Heinz Wiesinger
1541a59c83 Fix multiple values for the same key (include/listen) in server config file.
With this one can now also write

 - include:
   - file1
   - file2

Rather than only

 - include: file1
 - include: file2
2019-02-19 09:26:15 +01:00
Niels Abspoel
854d1edcd4
Merge pull request #211 from noelmcloughlin/fix7
Fully document #193 stream module
2019-01-26 20:11:29 +01:00
N
8921404935
Update based on review comments 2019-01-26 16:07:58 +00:00
N
f2c4d80bf6
Document pid_file (#96) 2019-01-26 11:59:24 +00:00
N
5dfeeb9d08
Fully document #193 stream module 2019-01-25 22:50:00 +00:00
Niels Abspoel
a1220edb36
Merge pull request #209 from noelmcloughlin/fixes6
Fix sites-available bug in formula logic
2019-01-25 21:50:40 +01:00
N
cc450e2d78
Document issue 93 in pillar.example 2019-01-25 19:49:19 +00:00
N
2356b4a989
Fix bug related to #188 2019-01-25 19:20:58 +00:00
N
f347c14c74
Document workaround for #122 2019-01-25 15:43:12 +00:00
Niels Abspoel
355a968a2b
Merge pull request #197 from MEschenbacher/pillarcert
deploy certificates directly from pillar
2018-10-20 20:19:56 +02:00
Fabian Schlager
cfd7e670f4 Add example 2018-10-20 16:36:16 +02:00
Fabian Schlager
3125f9dbcc Add support for snippets 2018-10-20 16:29:13 +02:00
Alexandre Anriot
b2c07443ca Allow installation of multiple packages 2018-10-19 16:15:01 +02:00
Maximilian Eschenbacher
cb030b04ac deploy certificates directly from pillar
... by providing a pillar string. I developed this for use in
combination with ext_pillar and file_tree to deploy letsencrypt
certificates.
2018-10-04 16:26:37 +02:00
Alberto Chiusole
f4b3530e50 Replace tabs in pillar.example with spaces.
tabs cause salt to trigger a render error because tabs are 'illegal':
```
yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
  in "<unicode string>", line 33, column 32:
            pid: /var/run/nginx.pid\t\t### Directory location must exist
                                   ^
```
2018-09-23 23:12:05 +02:00
Konrad Mosoń
c75ad64348
Example for load_module: comment how it works 2018-06-29 12:55:17 +02:00
Konrad Mosoń
9c4634d40a
Example for load_module 2018-06-29 12:46:12 +02:00
Javier Bértoli
c5c1047865 Allow to specify a different passenger config file in nginx.ng 2018-02-13 21:27:15 -03:00
Andres Montalban
ac90a9f07b Fix for saltstack-formulas/nginx-formula/#172 2017-12-22 10:33:23 -03:00
Niels Abspoel
4204505489
Merge pull request #153 from EvaSDK/add_dhparam_creation
Add dhparam creation
2017-12-16 09:26:20 +01:00
Andres Montalban
73899178fc Remove trailing spaces 2017-12-12 17:10:51 -03:00
David Seira
f50c7e27e1 New Feature - Added deleted option to be able to remove site files (clean up sites folder)
Improvement - Disable reload of nginx when enabled=False (previously the nginx was always reloaded if settings.config != None; even with enabled=False)
2017-09-01 11:23:15 +02:00
David Seira
bc7f8f4970 Replace source for source_path variable name 2017-08-31 13:19:46 +02:00
David Seira
1f697b9d6b New feature - Enable the uploading of the config file (nginx.conf and sites) instead of templating those file 2017-08-30 19:48:44 +02:00
Noel McLoughlin
433bda5671 Additional explanatory comments for pillar.example 2017-08-29 14:34:25 +01:00
Noel McLoughlin
2e03d4c17d Updated pillar.example file with installation learnings (OpenSUSE, Ubuntu, Fedora) 2017-08-28 16:20:58 +01:00
Gilles Dartiguelongue
d2bc1e6d7c Add support for specifying dh_param file name 2017-08-18 11:53:02 +02:00
Gilles Dartiguelongue
19ab90ebb5 Add example for DH management 2017-08-18 11:47:20 +02:00
abednarik
57011ba3bf Make certificates path configurable. 2017-07-31 17:20:30 -03:00
Javier Bértoli
79ddb497d0 Add support to install and configure passenger 2017-06-24 10:43:25 -03:00
Renich Bon Ciric
92a8461ab3 replace the term vhost for server everywhere 2016-10-19 16:35:38 -05:00
George Robinson
241d8683ed Overwrite existing vhost files on a per vhost granularity 2016-06-05 19:34:53 +01:00
George Robinson
f24b066c43 Build from source with nginx.ng
Build NGINX from source with nginx.ng state with support for passing
compile time flags necessary for installing modules such as more headers
by the openresty project.
2016-05-09 16:39:24 +01:00
Gianni Carabelli
91f92164be enabled 2016-04-04 15:30:26 +02:00
Enver
46785b79aa Added support to control gpgcheck and gpgkey via pillar 2016-02-24 11:11:42 +01:00
Rubén Díaz
ad62dac2b0 Adding default include for 'sites-enabled' dir 2015-10-06 10:18:48 +00:00