Skip to content
This repository was archived by the owner on Nov 17, 2020. It is now read-only.

Commit 36df40f

Browse files
author
Sebastian Gumprich
committed
create dhparam file
1 parent 70126ad commit 36df40f

File tree

6 files changed

+9
-1
lines changed

6 files changed

+9
-1
lines changed

defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ nginx_add_header: [
2222
nginx_ssl_protocols: "TLSv1 TLSv1.1 TLSv1.2"
2323
nginx_ssl_ciphers: "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA"
2424
nginx_ssl_prefer_server_ciphers: "on"
25+
nginx_dh_param: "{{nginx_root_dir}}/dh{{nginx_dh_size}}.pem"
2526
nginx_dh_size: "2048"

tasks/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,7 @@
2929
file: path="{{nginx_default_conf}}" state=absent
3030
when: nginx_remove_default_site
3131
notify: reload nginx
32+
33+
- name: generate dh group
34+
command: openssl dhparam -out {{nginx_dh_param}} {{nginx_dh_size}} creates={{nginx_dh_param}}
35+
notify: reload nginx

templates/hardening.conf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ limit_conn_zone {{nginx_limit_conn_zone}};
1010
limit_conn {{nginx_limit_conn}};
1111
ssl_protocols {{nginx_ssl_protocols}};
1212
ssl_ciphers {{nginx_ssl_ciphers}};
13-
ssl_dhparam {{nginx_dh_size}};
13+
ssl_dhparam {{nginx_dh_param}};
1414
ssl_prefer_server_ciphers {{nginx_ssl_prefer_server_ciphers}};
1515
{% for header in nginx_add_header %}
1616
add_header {{header}};

vars/Debian.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
nginx_root_dir: '/etc/nginx'
12
nginx_config_conf_dir: '/etc/nginx/conf.d'
23
nginx_default_conf: '/etc/nginx/sites-enabled/default'
34
nginx_service_name: 'nginx'

vars/Oracle Linux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
nginx_root_dir: '/etc/nginx'
12
nginx_config_conf_dir: '/etc/nginx/conf.d'
23
nginx_default_conf: '/etc/nginx/conf.d/default.conf'
34
nginx_service_name: 'nginx'

vars/RedHat.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
nginx_root_dir: '/etc/nginx'
12
nginx_config_conf_dir: '/etc/nginx/conf.d'
23
nginx_default_conf: '/etc/nginx/conf.d/default.conf'
34
nginx_service_name: 'nginx'

0 commit comments

Comments
 (0)