Compare commits

...

4 commits

Author SHA1 Message Date
Christian Fraß 71aea3040a [int] 2025-10-07 16:15:58 +02:00
Christian Fraß da1e27459f [int] 2025-10-07 16:12:13 +02:00
Christian Fraß c4db57b83a [int] 2025-10-07 16:07:09 +02:00
Christian Fraß 4a7a75651c [int] 2025-10-07 16:04:07 +02:00
6 changed files with 50 additions and 15 deletions

View file

@ -369,7 +369,13 @@
"userinfo" "userinfo"
] ]
}, },
"default": null "default": [
"authorization",
"token",
"revocation",
"introspection",
"userinfo"
]
} }
}, },
"additionalProperties": false, "additionalProperties": false,

View file

@ -46,7 +46,13 @@
"custom": { "custom": {
} }
}, },
"cors_endpoints": null "cors_endpoints": [
"authorization",
"token",
"revocation",
"introspection",
"userinfo"
]
} }
} }
} }

View file

@ -0,0 +1,20 @@
{
"nullable": false,
"type": "object",
"properties": {
"auto_reload_interval": {
"nullable": true,
"type": "integer",
"description": "in hours",
"default": null
},
"improved_security": {
"nullable": false,
"type": "boolean",
"default": false
}
},
"additionalProperties": false,
"required": [
]
}

View file

@ -1,3 +1,6 @@
{ {
"var_nginx_auto_reload_interval": null "cfg_nginx_defaults": {
"auto_reload_interval": null,
"improved_security": false
}
} }

View file

@ -1,4 +1,10 @@
[ [
{
"name": "show vars",
"ansible.builtin.debug": {
"var": "vars"
}
},
{ {
"name": "install packages", "name": "install packages",
"become": true, "become": true,
@ -12,6 +18,7 @@
}, },
{ {
"name": "generate dhparams file", "name": "generate dhparams file",
"when": "cfg_nginx.improved_security",
"become": true, "become": true,
"ansible.builtin.command": { "ansible.builtin.command": {
"cmd": "openssl dhparam -out /etc/nginx/dhparam 4096" "cmd": "openssl dhparam -out /etc/nginx/dhparam 4096"
@ -22,6 +29,7 @@
}, },
{ {
"name": "place hardening config", "name": "place hardening config",
"when": "cfg_nginx.improved_security",
"become": true, "become": true,
"ansible.builtin.copy": { "ansible.builtin.copy": {
"src": "ssl-hardening.conf", "src": "ssl-hardening.conf",
@ -59,13 +67,13 @@
}, },
{ {
"name": "auto reload", "name": "auto reload",
"when": "var_nginx_auto_reload_interval == None", "when": "cfg_nginx.auto_reload_interval == None",
"become": true, "become": true,
"ansible.builtin.cron": { "ansible.builtin.cron": {
"name": "nginx_auto_reload", "name": "nginx_auto_reload",
"disabled": true, "disabled": true,
"minute": "0", "minute": "0",
"hour": "*/{{var_nginx_auto_reload_interval | string}}", "hour": "*/{{cfg_nginx.auto_reload_interval | string}}",
"day": "*", "day": "*",
"month": "*", "month": "*",
"weekday": "*", "weekday": "*",
@ -74,13 +82,13 @@
}, },
{ {
"name": "auto reload", "name": "auto reload",
"when": "var_nginx_auto_reload_interval != None", "when": "cfg_nginx.auto_reload_interval != None",
"become": true, "become": true,
"ansible.builtin.cron": { "ansible.builtin.cron": {
"name": "nginx_auto_reload", "name": "nginx_auto_reload",
"disabled": false, "disabled": false,
"minute": "0", "minute": "0",
"hour": "*/{{var_nginx_auto_reload_interval | string}}", "hour": "*/{{cfg_nginx.auto_reload_interval | string}}",
"day": "*", "day": "*",
"month": "*", "month": "*",
"weekday": "*", "weekday": "*",

View file

@ -1,8 +0,0 @@
{
"auto_reload_interval": {
"description": "in hours",
"nullable": true,
"type": "integer",
"mandatory": false
}
}