public-health-ch/ansible/web.yaml
2020-05-16 15:12:07 +02:00

28 lines
775 B
YAML

---
- name: Deploy web server (NGINX) configuration
hosts: webservers
become: true
gather_facts: true
tasks:
- name: Copy certificate public key
tags: nginx_template_config
copy:
src: cloudflare.pem
dest: "/etc/ssl/certs/cloudflare.pem"
- name: Copy certificate private key
tags: nginx_template_config
copy:
src: cloudflare.key
dest: "/etc/ssl/certs/cloudflare.key"
roles:
- role: nginxinc.nginx
vars:
release_dir: /opt/publichealth
ipv4_addresses: "{{ ansible_all_ipv4_addresses }}"
nginx_http_template_enable: true
nginx_http_template:
default:
template_file: web/nginx.conf.j2
conf_file_name: default.conf
conf_file_location: /etc/nginx/conf.d/