summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/open-contrail/tasks/provision/-rabbitmq-stop.yml
blob: ec6b2fe082289ecd114f9fa71c946123250c1665 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
- name: 'stop rabbitmq server'
  service:
    name: 'rabbitmq-server'
    state: 'stopped'

- name: 'check beam process'
  shell: 'ps ax | grep -v grep | grep beam'
  register: beam_process
  changed_when: no
  ignore_errors: yes

- name: 'kill beam processes'
  shell: 'pkill -9 beam'
  when: beam_process.stdout

- name: 'check epmd process'
  shell: 'ps ax | grep -v grep | grep epmd'
  register: epmd_process
  changed_when: no
  ignore_errors: yes

- name: 'kill epmd processes'
  shell: 'pkill -9 epmd'
  when: epmd_process.stdout

- name: 'remove mnesia directory'
  file:
    name: '/var/lib/rabbitmq/mnesia'
    state: 'absent'