merged reverse proxy role, added docu

This commit is contained in:
nd 2019-02-10 21:21:12 +01:00
parent 2ebc49541a
commit d0e8250cbc
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
6 changed files with 165 additions and 0 deletions

View file

@ -30,6 +30,39 @@
notify:
- restart nginx
- name: execute upstream template
template:
src: upstreams.conf.j2
dest: /etc/nginx/conf.d/upstreams.conf
notify:
- restart nginx
- name: create nginx vhosts
template:
dest: "/etc/nginx/sites-available/{{ item.key }}"
src: vhost.j2
with_dict: "{{ nginx.vhosts }}"
notify:
- restart nginx
- name: enable nginx vhosts
file:
src: "/etc/nginx/sites-available/{{ item.key }}"
path: "/etc/nginx/sites-enabled/{{ item.key }}"
state: link
with_dict: "{{ nginx.vhosts }}"
notify:
- restart nginx
- name: enable https redirect
file:
src: "/etc/nginx/sites-available/https-redirect"
path: "/etc/nginx/sites-enabled/https-redirect"
state: link
when: nginx.force_ssl
notify:
- restart nginx
- name: delete nginx default config
file: path=/etc/nginx/sites-enabled/default state=absent