Commit 698a4c1f by Feanil Patel

Add restart handlers for edxapp services.

parent 835a4172
---
# Restart Start all services.
- name: restart lms
service: name=lms state=restarted
tags:
- lms
- deploy
- name: restart lms-xml
service: name=lms-xml state=restarted
tags:
- lms-xml
- deploy
- name: restart lms-preview
service: name=lms-preview state=restarted
tags:
- lms-preview
- deploy
- name: restart cms
service: name=cms state=restarted
tags:
- cms
- deploy
......@@ -78,6 +78,10 @@
- name: gather lms static assets with rake
shell: executable=/bin/bash chdir=/opt/wwc/edx-platform SERVICE_VARIANT={{ LMS_VARIANT }} rake lms:gather_assets:aws
when: grep_gather_assets.rc == 0
notify:
- restart lms
- restart lms-xml
- restart lms-preview
sudo: yes
sudo_user: www-data
environment: "{{ deploy_environment }}"
......@@ -91,6 +95,10 @@
- name: gather lms static assets with django
shell: SERVICE_VARIANT={{ LMS_VARIANT }} django-admin.py collectstatic --pythonpath=/opt/wwc/edx-platform --settings=lms.envs.aws
when: grep_gather_assets.rc != 0 and check_lms_collect_static.rc == 0
notify:
- restart lms
- restart lms-xml
- restart lms-preview
sudo: yes
sudo_user: www-data
environment: "{{ deploy_environment }}"
......@@ -106,6 +114,8 @@
# script: gather_assets.sh
shell: executable=/bin/bash chdir=/opt/wwc/edx-platform SERVICE_VARIANT={{ CMS_VARIANT }} rake cms:gather_assets:aws
when: grep_gather_assets.rc == 0
notify:
- restart cms
sudo: yes
sudo_user: www-data
environment: "{{ deploy_environment }}"
......@@ -116,6 +126,8 @@
- name: gather cms static assets with django
shell: SERVICE_VARIANT={{ CMS_VARIANT }} django-admin.py collectstatic --pythonpath=/opt/wwc/edx-platform --settings=lms.envs.aws --noinput --verbosity=0
when: grep_gather_assets.rc != 0 and check_cms_collect_static.rc == 0
notify:
- restart cms
sudo: yes
sudo_user: www-data
environment: "{{ deploy_environment }}"
......@@ -126,6 +138,8 @@
- name: update cms templates
shell: SERVICE_VARIANT={{ CMS_VARIANT }} django-admin.py update_templates --pythonpath=/opt/wwc/edx-platform --settings=cms.envs.aws
when: check_cms_update_templates.rc == 0
notify:
- restart cms
sudo: yes
sudo_user: www-data
environment: "{{ deploy_environment }}"
......
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