merged reverse proxy role, added docu
This commit is contained in:
parent
2ebc49541a
commit
d0e8250cbc
6 changed files with 165 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue