Copy from GitHub repo

This commit is contained in:
Dmitry Vlasov
2020-08-12 00:02:27 +03:00
parent c447c45bbb
commit 42ae66e3ec
90 changed files with 5632 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
---
- hosts: bonchvisors
serial: 11
remote_user: cephadmin
become: true
become_user: root
become_method: sudo
tasks:
- name: detect osd number in array
shell: systemctl list-units --type=service --all | grep osd | awk '{print $1}' | awk -F "@" '{print $2}' | awk -F "." '{print $1}'
args:
executable: /bin/bash
register: osd_num
- name: delete osd
shell: ceph osd crush reweight osd.{{item}} 0.0; ceph osd out {{item}}; systemctl stop ceph-osd@{{item}}; ceph osd crush remove osd.{{item}}; ceph auth del osd.{{item}}; ceph osd rm {{item}}
args:
executable: /bin/bash
loop: "{{osd_num.stdout_lines}}"
when: osd_num.stdout != ""