blender-id/playbooks/setup_certificate.yaml

30 lines
814 B
YAML

---
- hosts: https
gather_facts: no
become: yes
roles: [common]
tasks:
- name: Creating various directories
file: path={{item}} state=directory owner={{ nginx.user }} group={{ nginx.group }}
with_items:
- "{{ dir.errors }}"
- name: Copying error pages
template:
src: "templates/nginx/errors/503-service-unavailable.html"
dest: "{{ dir.errors }}/503-service-unavailable.html"
- name: Copying nginx config
template:
src: templates/nginx/https.conf
dest: "{{ nginx_conf_dir }}/sites-available/{{ service_name }}.conf"
- import_tasks: common/tasks/nginx/enable_site.yaml
vars:
config_file: "{{ service_name }}.conf"
- import_tasks: common/tasks/nginx/get_certificate.yaml
notify:
- test nginx