Commit 772f740f by Ned Batchelder

Convert the 'restart xqueue' handler into a normal task

parent c024c39c
- name: restart xqueue
supervisorctl: >
name={{ item }}
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=restarted
when: xqueue_installed is defined and not disable_edx_services
with_items:
- xqueue
- xqueue_consumer
......@@ -23,8 +23,6 @@
template: >
src=xqueue_gunicorn.py.j2 dest={{ xqueue_app_dir }}/xqueue_gunicorn.py
sudo_user: "{{ xqueue_user }}"
notify:
- restart xqueue
tags:
- install
- install:configuration
......@@ -32,8 +30,6 @@
- name: create xqueue application config
template: src=xqueue.env.json.j2 dest={{ xqueue_app_dir }}/xqueue.env.json mode=0644
sudo_user: "{{ xqueue_user }}"
notify:
- restart xqueue
tags:
- install
- install:configuration
......@@ -41,8 +37,6 @@
- name: create xqueue auth file
template: src=xqueue.auth.json.j2 dest={{ xqueue_app_dir }}/xqueue.auth.json mode=0644
sudo_user: "{{ xqueue_user }}"
notify:
- restart xqueue
tags:
- install
- install:configuration
......@@ -54,8 +48,6 @@
accept_hostkey=yes
sudo_user: "{{ xqueue_user }}"
register: xqueue_checkout
notify:
- restart xqueue
tags:
- install
- install:code
......@@ -67,8 +59,6 @@
requirements="{{ xqueue_pre_requirements_file }}" virtualenv="{{ xqueue_venv_dir }}" state=present
extra_args="-i {{ COMMON_PYPI_MIRROR_URL }} --exists-action w"
sudo_user: "{{ xqueue_user }}"
notify:
- restart xqueue
tags:
- install
- install:application-requirements
......@@ -79,8 +69,6 @@
requirements="{{ xqueue_post_requirements_file }}" virtualenv="{{ xqueue_venv_dir }}" state=present
extra_args="-i {{ COMMON_PYPI_MIRROR_URL }} --exists-action w"
sudo_user: "{{ xqueue_user }}"
notify:
- restart xqueue
tags:
- install
- install:application-requirements
......@@ -95,8 +83,6 @@
DB_MIGRATION_USER: "{{ COMMON_MYSQL_MIGRATE_USER }}"
DB_MIGRATION_PASS: "{{ COMMON_MYSQL_MIGRATE_PASS }}"
when: migrate_db is defined and migrate_db|lower == "yes" and COMMON_MYSQL_MIGRATE_PASS
notify:
- restart xqueue
tags:
- migrate
- migrate:db
......@@ -105,8 +91,6 @@
shell: >
SERVICE_VARIANT=xqueue {{ xqueue_venv_bin }}/django-admin.py update_users --settings=xqueue.aws_settings --pythonpath={{ xqueue_code_dir }}
sudo_user: "{{ xqueue_user }}"
notify:
- restart xqueue
tags:
- manage
- manage:app-users
......@@ -148,4 +132,13 @@
- install
- install:app-requirements
- set_fact: xqueue_installed=true
- name: restart xqueue
supervisorctl: >
name={{ item }}
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=restarted
when: not disable_edx_services
with_items:
- xqueue
- xqueue_consumer
......@@ -12,8 +12,6 @@
home="{{ xqueue_app_dir }}"
createhome=no
shell=/bin/false
notify:
- restart xqueue
tags:
- install
- install:base
......@@ -24,8 +22,6 @@
state=directory
owner="{{ xqueue_user }}"
group="{{ common_web_group }}"
notify:
- restart xqueue
with_items:
- "{{ xqueue_app_dir }}"
- "{{ xqueue_venvs_dir }}"
......@@ -35,8 +31,6 @@
- name: install a bunch of system packages on which xqueue relies
apt: pkg={{','.join(xqueue_debian_pkgs)}} state=present
notify:
- restart xqueue
tags:
- install
- install:system-requirements
......
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