summaryrefslogtreecommitdiffstats
path: root/src/ceph-volume/ceph_volume/tests/functional/batch/playbooks/test_zap.yml
blob: 4408288c8d1d3e885ba1cbc72d59d569fa481ba8 (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
31
32
33
34
- hosts: osds
  become: yes
  tasks:

    - name: stop ceph-osd daemons
      service:
        name: "ceph-osd@{{ item }}"
        state: stopped
      with_items: "{{ osd_ids }}"


- hosts: mons
  become: yes
  tasks:

    - name: mark osds down
      command: "ceph osd down osd.{{ item }}"
      with_items: "{{ osd_ids }}"
    - name: purge osds
      command: "ceph osd purge osd.{{ item }} --yes-i-really-mean-it"
      with_items: "{{ osd_ids }}"


- hosts: osds
  become: yes
  tasks:

    - name: zap devices used for OSDs
      command: "ceph-volume lvm zap --osd-id {{ item }} --destroy"
      with_items: "{{ osd_ids }}"
      environment:
        CEPH_VOLUME_DEBUG: 1