blender-open-data/playbooks/setup_certificate.yaml

31 lines
753 B
YAML

---
- hosts: ingress
gather_facts: false
become: true
roles: [common]
vars:
nginx_var_prefix: "{{ service_name|regex_replace('-', '_') }}"
tasks:
- import_tasks: common/tasks/nginx/copy_error_pages.yaml
- name: Copying nginx config
ansible.builtin.template:
src: templates/nginx/site.conf
dest: "{{ nginx_conf_dir }}/sites-available/{{ service_name }}.conf"
mode: 0644
backup: true
tags:
- nginx
vars:
is_https_config: true
- import_tasks: common/tasks/nginx/enable_site.yaml
tags:
- nginx
vars:
config_file: "{{ service_name }}.conf"
- import_tasks: common/tasks/nginx/get_certificate.yaml
notify:
- test nginx