forked from FF-RGB/ansible
18 lines
713 B
YAML
18 lines
713 B
YAML
---
|
|
|
|
- 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
|