1
0
mirror of https://github.com/bigchaindb/bigchaindb.git synced 2024-06-10 20:05:02 +02:00
bigchaindb/pkg/configuration/roles/bigchaindb/tasks/stop.yml
Muawia Khan 75c22141ad
Problem: mongodb repos different for debian and ubuntu (#2385)
* Problem: mongodb repos different for debian and ubuntu

* Ignore errors for checking bdb process
2018-07-23 17:38:24 +02:00

35 lines
1002 B
YAML

---
- name: Stopping BigchainDB Docker
docker_container:
name: "{{ bigchaindb_docker_name }}{{ item }}"
image: "{{ bigchaindb_image_name }}:{{ bigchaindb_image_tag }}"
keep_volumes: no
state: absent
force_kill: yes
with_sequence: start=1 end="{{ stack_size|int }}" stride=1
when: stack_type|lower == "docker" or stack_type|lower == "cloud"
tags: [bigchaindb]
- name: Get Running BigchainDB Process(es)
shell: "ps aux | grep \"[b]igchaindb\" | awk '{print $2}'"
register: bdb_ps
ignore_errors: yes
when: stack_type|lower == "local"
tags: [bigchaindb]
- name: Kill BigchainDB Process(es)
shell: "kill -9 {{ item }}"
with_items: "{{ bdb_ps.stdout_lines }}"
when: stack_type|lower == "local" and bdb_ps.stdout_lines|length > 0
tags: [bigchaindb]
- name: Kill auxiliary BigchainDB Process(es)
shell: "pkill {{ item }}"
with_items:
- logging_server
- ws
- gunicorn
ignore_errors: yes
when: stack_type|lower == "local"
tags: [bigchaindb]