Commit 7556fbb3 by Feanil Patel

Only restart apps.

parent ffa8eaeb
......@@ -5,30 +5,6 @@
# TODO: the supervisor ansible module does not support
# stopping and starting services by group.
- name: edxapp | stop the edxapp services (supervisor)
supervisorctl: >
name="edxapp:{{ item }}"
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=stopped
when: celery_worker is not defined
with_items: service_variants_enabled
sudo_user: "{{ common_web_user }}"
tags:
- deploy
- name: edxapp | stop the celery worker services (supervisor)
supervisorctl: >
name="edxapp_worker:{{ item.service_variant }}_{{ item.queue }}_{{ item.concurrency }}"
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=stopped
when: celery_worker is defined
with_items: edxapp_workers
sudo_user: "{{ common_web_user }}"
tags:
- deploy
# Do A Checkout
- name: edxapp | checkout edx-platform repo into {{edxapp_code_dir}}
git: dest={{edxapp_code_dir}} repo={{edx_platform_repo}} version={{edx_platform_commit}}
......@@ -202,24 +178,24 @@
# gather_assets and db migrations
- include: service_variant_config.yml
- name: edxapp | start the edxapp services (supervisor)
- name: edxapp | restart the edxapp services (supervisor)
supervisorctl: >
name="edxapp:{{ item }}"
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=started
state=restarted
when: celery_worker is not defined
with_items: service_variants_enabled
sudo_user: "{{ common_web_user }}"
tags:
- deploy
- name: edxapp | start the celery worker services (supervisor)
- name: edxapp | restart the celery worker services (supervisor)
supervisorctl: >
name="edxapp_worker:{{ item.service_variant }}_{{ item.queue }}_{{ item.concurrency }}"
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=started
state=restarted
when: celery_worker is defined
with_items: edxapp_workers
sudo_user: "{{ common_web_user }}"
......
---
- name: forum | stop the forum service
supervisorctl: >
name=forum
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=stopped
tags:
- deploy
- name: forum | create the supervisor wrapper
template: >
src={{ forum_supervisor_wrapper|basename }}.j2
......
# Stop xqueue service.
- name: xqueue | stop xqueue service
supervisorctl: >
name=xqueue
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=stopped
tags:
- deploy
- name: xqueue | stop xqueue consumer service
supervisorctl: >
name=xqueue_consumer
......@@ -84,20 +74,20 @@
tags:
- deploy
- name: xqueue | start xqueue
- name: xqueue | restart xqueue
supervisorctl: >
name=xqueue
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=started
state=restarted
tags:
- deploy
- name: xqueue | start xqueue consumer
- name: xqueue | restart xqueue consumer
supervisorctl: >
name=xqueue_consumer
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=started
state=restarted
tags:
- deploy
- name: xserver | stop xserver
supervisorctl: >
name=xserver
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=stopped
tags:
- deploy
- name: xserver | checkout code
git: dest={{xserver_code_dir}} repo={{xserver_source_repo}} version={{xserver_version}}
sudo_user: "{{ xserver_user }}"
......@@ -20,15 +11,6 @@
tags:
- deploy
- name: xserver | ensuring xserver is activated in supervisor
supervisorctl: >
name="xserver"
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=present
tags:
- deploy
- name: xserver | install requirements
pip: requirements="{{xserver_requirements_file}}" virtualenv="{{ xserver_venv_dir }}" state=present
sudo_user: "{{ xserver_user }}"
......@@ -74,11 +56,11 @@
tags:
- deploy
- name: xserver | start xserver
- name: xserver | restart xserver
supervisorctl: >
name=xserver
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=started
state=restarted
tags:
- deploy
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