Commit 287a26cc by Feanil Patel

Make the retire-hosts job be compatible with

systemd.

- Systemctl doesn't have a no-wait parameter.
- Shell instead of command to send logs to s3, command was failing on
  '||'
parent da578d17
......@@ -11,9 +11,11 @@
- name: Stop all services
hosts: "{{TARGET}}"
become: True
gather_facts: False
vars:
STOP_ALL_EDX_SERVICES_EXTRA_ARGS: "--no-wait"
gather_facts: True
pre_tasks:
- set_fact:
STOP_ALL_EDX_SERVICES_EXTRA_ARGS: "--no-wait"
when: ansible_distribution_release == 'precise' or ansible_distribution_release == 'trusty'
roles:
- stop_all_edx_services
......@@ -23,7 +25,7 @@
gather_facts: False
tasks:
- name: Terminate existing object store log sync
command: /usr/bin/pkill send-logs-to-object-store || true
shell: /usr/bin/pkill send-logs-to-object-store || true
- name: "Ensure send-logs-to-object-store script is in the logrotate file"
shell: grep send-logs-to-object-store /etc/logrotate.d/hourly/tracking.log
# We only force a rotation of edx logs.
......
......@@ -81,10 +81,10 @@
- name: add ppas for current versions of nodejs
apt_repository:
repo: "{{ edxapp_chrislea_ppa }}"
when: ansible_distribution_release == 'precise'
tags:
- install
- install:base
when: ansible_distribution_release == 'precise'
- name: install system packages on which LMS and CMS rely
apt:
......
......@@ -62,5 +62,13 @@
notify:
- stop mongodb
- name: Stop supervisor systemd
stat:
path: /etc/systemd/system/supervisor.service
register: stat_out
changed_when: stat_out is defined and stat_out.stat.exists
notify:
- stop supervisor
- shell: "true"
notify: kill processes by user
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