blob: 6eadac7272e5e58ef4cad4cfb2db02fb5cbc670e [file] [log] [blame]
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
- hosts: metrics
become: yes
tasks:
- name: "stop influxdb and grafana"
service: name={{ item }} state=stopped
with_items:
- influxdb
- grafana-server
- name: "wipe influxdb data"
file: path={{ default_data_dirs[0] }}/influxdb state=absent
register: delete_task
retries: 10
delay: 3
until: delete_task is success
- name: "wipe grafana db"
file: path=/var/lib/grafana/grafana.db state=absent
register: delete_task
retries: 10
delay: 3
until: delete_task is success
- import_playbook: wipe-systemd.yml
when: use_systemd
- import_playbook: kill.yml
- hosts: all
tasks:
- name: "wipe software installation dirs"
file: path={{ item }} state=absent
with_items:
- "{{ hadoop_home }}"
- "{{ zookeeper_home }}"
- "{{ accumulo_home }}"
- "{{ fluo_home }}"
- "{{ spark_home }}"
- "{{ maven_home }}"
- "{{ hub_home }}"
- "{{ fluo_yarn_home }}"
register: delete_task
retries: 10
delay: 3
until: delete_task is success
- hosts: hadoop
tasks:
- name: "wipe hadoop data"
file: path={{ item }}/hadoop state=absent
with_items: "{{ worker_data_dirs }}"
register: delete_task
retries: 10
delay: 3
until: delete_task is success
- name: "remove logs folder"
file: path={{ item }}/logs state=absent
with_items: "{{ worker_data_dirs }}"
register: delete_task
retries: 10
delay: 3
until: delete_task is success
- hosts: zookeepers
tasks:
- name: "wipe zookeeper data"
file: path={{ item }}/zookeeper state=absent
with_items: "{{ default_data_dirs }}"
register: delete_task
retries: 10
delay: 3
until: delete_task is success
- name: "remove logs folder"
file: path={{ item }}/logs state=absent
with_items: "{{ default_data_dirs }}"
register: delete_task
retries: 10
delay: 3
until: delete_task is success
- hosts: accumulo
tasks:
- name: "remove accumulo folder"
file: path={{ item }}/accumulo state=absent
with_items: "{{ worker_data_dirs }}"
register: delete_task
retries: 10
delay: 3
until: delete_task is success
- name: "remove logs folder"
file: path={{ item }}/logs state=absent
with_items: "{{ worker_data_dirs }}"
register: delete_task
retries: 10
delay: 3
until: delete_task is success