Browse Source

fix nginx proxy config deploy

python3
Andrea Cimbalo 8 years ago
parent
commit
fc07f62256
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      roles/nginx/tasks/main.yaml

+ 6
- 2
roles/nginx/tasks/main.yaml View File

@ -27,10 +27,9 @@
- name: upload nginx proxy configuration
template:
src: proxy_nginx.j2
dest: "/etc/nginx/sites-available/{{ config_name }}"
dest: "/etc/nginx/sites-available/{{ config_name }}.conf"
when: is_proxy | bool
notify:
- enable nginx configuration
- restart nginx
- name: add nginx configurations
@ -39,6 +38,11 @@
dest: /etc/nginx/sites-available/{{ item }}.conf
with_items: "{{ config_names }}"
- name: add proxy to config_names
set_fact:
config_names: "{{ config_names | union( [config_name])}}"
when: is_proxy | bool
- name: enable nginx configurations
file:
src: "/etc/nginx/sites-available/{{ item }}.conf"


Loading…
Cancel
Save