nginx/site: Include extra snippets to template
This commit is contained in:
parent
22470d8a49
commit
c2e6c0f59d
3 changed files with 12 additions and 29 deletions
|
@ -67,31 +67,3 @@
|
|||
- role: nginx/site
|
||||
site: zm.foo.sh
|
||||
proxy: https://zm02.home.foo.sh/
|
||||
|
||||
tasks:
|
||||
- name: create extra nginx config directories
|
||||
file:
|
||||
path: /etc/nginx/conf.d/www.foo.sh
|
||||
state: directory
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
- name: install redirects config for www.foo.sh
|
||||
copy:
|
||||
dest: /etc/nginx/conf.d/www.foo.sh/redirects.conf
|
||||
content: |
|
||||
location /collab/ { return 301 https://collab.foo.sh/; }
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: restart nginx
|
||||
- name: install proxy config for www.foo.sh
|
||||
copy:
|
||||
dest: /etc/nginx/conf.d/www.foo.sh/proxy.conf
|
||||
content: |
|
||||
location /roles/ { proxy_pass https://static02.home.foo.sh/roles/; }
|
||||
location /~ { proxy_pass https://static02.home.foo.sh/~; }
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: restart nginx
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue