Commit b4a72eea by Jason Bau

move conditional into nginx/tasks/nginx_site.yml

parent 87eb8ec2
......@@ -18,10 +18,8 @@
- update
- include: ../../nginx/tasks/nginx_site.yml state=link site_name=cms
when_set: $nginx_role_run
- include: ../../nginx/tasks/nginx_site.yml state=link site_name=cms-backend
when_set: $nginx_role_run
- name: Create CMS log target directory
file: path={{log_base_dir}}/cms state=directory owner=syslog group=adm mode=2770
......
......@@ -16,10 +16,8 @@
- lms-preview-env
- include: ../../nginx/tasks/nginx_site.yml state=link site_name=lms-preview
when_set: $nginx_role_run
- include: ../../nginx/tasks/nginx_site.yml state=link site_name=lms-preview-backend
when_set: $nginx_role_run
# Creates LMS Preview upstart file
- include: ../../gunicorn/tasks/upstart.yml service_variant=lms-preview
......@@ -18,10 +18,8 @@
- update
- include: ../../nginx/tasks/nginx_site.yml state=link site_name=lms-xml
when_set: $nginx_role_run
- include: ../../nginx/tasks/nginx_site.yml state=link site_name=lms-xml-backend
when_set: $nginx_role_run
# Creates upstart file
- include: ../../gunicorn/tasks/upstart.yml service_variant=lms-xml
......@@ -14,10 +14,6 @@
- update
- include: ../../nginx/tasks/nginx_site.yml state=link site_name=lms
when_set: $nginx_role_run
- include: ../../nginx/tasks/nginx_site.yml state=link site_name=lms-backend
when_set: $nginx_role_run
# Creates LMS upstart file
- include: ../../gunicorn/tasks/upstart.yml service_variant=lms
......@@ -7,6 +7,7 @@
# seems like paths in first_available_file must be relative to the playbooks dir
- "roles/nginx/templates/{{ site_name }}.j2"
notify: restart nginx
when_set: $nginx_role_run
tags:
- nginx
- lms
......@@ -17,6 +18,7 @@
- name: Creating nginx config link {{ site_name }}
file: src=/etc/nginx/sites-available/{{ site_name }} dest=/etc/nginx/sites-enabled/{{ site_name }} state={{ state }} owner=root group=root
notify: restart nginx
when_set: $nginx_role_run
tags:
- nginx
- lms
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment