diff options
author | Robin Obůrka <r.oburka@gmail.com> | 2016-07-22 17:24:40 +0200 |
---|---|---|
committer | Robin Obůrka <r.oburka@gmail.com> | 2016-08-30 20:22:11 +0200 |
commit | 15273e4abaf8eecbf5fcdd01436c521c42bcad58 (patch) | |
tree | 3652c98bdd897c10b6fd16a8f10289f8afadab46 /roles | |
parent | Provides roles acme and nginx (diff) | |
download | ansible-roles-15273e4abaf8eecbf5fcdd01436c521c42bcad58.tar.xz |
nginx: Upload new dhparams defined by variable
Diffstat (limited to 'roles')
-rw-r--r-- | roles/nginx/tasks/main.yml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/roles/nginx/tasks/main.yml b/roles/nginx/tasks/main.yml index da86af6..bb9b8b9 100644 --- a/roles/nginx/tasks/main.yml +++ b/roles/nginx/tasks/main.yml @@ -7,10 +7,24 @@ with_items: - nginx +- name: Upload new DH params file + copy: + src: "{{ dhparams }}" + dest: /etc/ssl/dh4096.pem + owner: root + group: root + mode: 0644 + notify: + - restart nginx + when: dhparams is defined + - name: Generate dhparams command: openssl dhparam -out /etc/ssl/dh4096.pem 4096 args: creates: /etc/ssl/dh4096.pem + notify: + - restart nginx + when: dhparams is not defined - name: Fix dhparams privileges file: @@ -18,6 +32,8 @@ owner: root group: root mode: 0644 + notify: + - restart nginx - name: Deploy snippets template: |