27 lines
541 B
YAML
27 lines
541 B
YAML
|
---
|
||
|
- name: Configure Nginx load balancer with SSL
|
||
|
template:
|
||
|
src: nginx_proxy_ssl.conf.j2
|
||
|
dest: "/etc/nginx/conf.d/proxy.conf"
|
||
|
tags: proxy
|
||
|
|
||
|
- name: Ensure SSL directory exists
|
||
|
file:
|
||
|
path: /etc/nginx/ssl
|
||
|
state: directory
|
||
|
mode: '0755'
|
||
|
tags: proxy
|
||
|
|
||
|
- name: Copy Diffie-Hellman parameters
|
||
|
copy:
|
||
|
src: dhparam.pem
|
||
|
dest: /etc/nginx/ssl/dhparam.pem
|
||
|
mode: '0600'
|
||
|
tags: proxy
|
||
|
|
||
|
- name: Restart Nginx after configuration
|
||
|
service:
|
||
|
name: nginx
|
||
|
state: restarted
|
||
|
tags: proxy
|