ansible-ffrgb/roles/web-svc/tasks/reverse.yml

18 lines
713 B
YAML
Raw Normal View History

2020-06-16 23:42:14 +02:00
---
- name: Ensure certificates are available
command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/nginx/ssl/{{ rev_domain }}.key -out /etc/nginx/ssl/{{ rev_domain }}.crt -days 730 -subj "/CN={{ rev_domain }}" creates=/etc/nginx/ssl/{{ rev_domain }}.crt
notify: Restart nginx
- name: Configure certificate manager
template: src=rev_certs.j2 dest=/etc/acertmgr/{{ rev_domain }}.conf
notify: Run acertmgr
- name: Configure vhosts
template: src=rev_vhost.j2 dest=/etc/nginx/sites-available/{{ rev_domain }}
notify: Restart nginx
- name: Enable vhosts
file: src=/etc/nginx/sites-available/{{ rev_domain }} dest=/etc/nginx/sites-enabled/{{ rev_domain }} state=link
notify: Restart nginx