Commit 2fe38291 by e0d

Merge pull request #1455 from edx/e0d/logrotate-on-retire

E0d/logrotate on retire
parents 1a2dd337 784f6c7c
# ansible-playbook -i ./lifecycle_inventory.py ./retire_host.yml
# -e@/vars/env.yml --limit Terminating_Wait
- name: Stop all services
- name: Server retirement workflow
hosts: all
sudo: True
gather_facts: False
......@@ -9,17 +9,31 @@
STOP_ALL_EDX_SERVICES_EXTRA_ARGS: "--no-wait"
roles:
- stop_all_edx_services
- name: Sync the logs to s3
hosts: all
sudo: True
tasks:
- name: run log script
- name: Force a log rotation
command: /usr/sbin/logrotate -f /etc/logrotate.d/{{ item }}
with_items:
- "apport"
- "apt"
- "aptitude"
- "dpkg"
- "hourly"
- "landscape-client"
- "newrelic-sysmond"
- "nginx"
- "nginx-access"
- "nginx-error"
- "ppp"
- "rsyslog"
- "ufw"
- "unattended-upgrades"
- "upstart"
- name: Force a log rotation
command: /usr/sbin/logrotate -f /etc/logrotate.d/hourly/{{ item }}
with_items:
- "tracking.log"
- "edx-services"
- name: Send logs to s3
command: /edx/bin/send-logs-to-s3
- name: Run minos
hosts: all
sudo: True
tasks:
- name: run minos
- name: Run minos
command: /edx/app/minos/venvs/bin/minos --config /edx/etc/minos/minos.yml --json
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