We now have the ability to shrink a ceph cluster with the help of 2 new
playbooks. Even if a lot portions of those are identical I thought I
would make more sense to separate both for several reasons:
* it is rare to remove mon(s) and osd(s)
* this remains a tricky process so to avoid any overlap we keep things
* separated
For monitors, just select the list of the monitor hostnames you want to
delete from the cluster and execute the playbook like this. The hostname
must be resolvable. Then run the playbook like this:
ansible-playbook shrink-cluster.yml -e mon_host=ceph-mon-01,ceph-mon-02
Are you sure you want to shrink the cluster? [no]: yes
For OSDs, just select the list of the OSD id you want to delete from the
cluster and execute the playbook like this:
ansible-playbook shrink-cluster.yml -e osd_ids=0,2,4
Are you sure you want to shrink the cluster? [no]: yes
If you know what you're doing you can run it like this:
ansible-playbook shrink-cluster.yml -e ireallymeanit=yes -e
osd_ids=0,2,4
Thanks a lot to @SamYaple for his help on the complex
variables/fact/filters
Signed-off-by: Sébastien Han <seb@redhat.com>