Add teardown support
This MR adds the ability to teardown a previously bootstrapped set of nodes and attached disks.
Attempting to teardown but not answering YES
$ ansible-playbook teardown.yml -e "prefix_name=ash-lfs-test"
This will remove hosts and disks, are you sure? Answer with 'YES' [NO]: no
_____________________________
< PLAY [Remove Geo instances] >
-----------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
___________________________
< TASK [Check Confirmation] >
---------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Playbook run confirmation failed"}
____________
< PLAY RECAP >
------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Attempting to teardown and answering YES
$ ansible-playbook teardown.yml -e "prefix_name=ash-lfs-test"
This will remove hosts and disks, are you sure? Answer with 'YES' [NO]: YES
_____________________________
< PLAY [Remove Geo instances] >
-----------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
___________________________
< TASK [Check Confirmation] >
---------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
skipping: [localhost]
______________
< TASK [debug] >
--------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
ok: [localhost] => {
"msg": "[WARNING] Removing can take some time, so please be patient 🙏"
}
____________________________________
< TASK [Remove Geo primary instance] >
------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
ok: [localhost]
_________________________________
< TASK [Remove primary DNS entry] >
---------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
ok: [localhost]
______________________________________
< TASK [Remove Geo secondary instance] >
--------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
ok: [localhost]
___________________________________
< TASK [Remove secondary DNS entry] >
-----------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
ok: [localhost]
____________
< PLAY RECAP >
------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
localhost : ok=5 changed=0 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0
Closes: #8 (closed)
Edited by Ash McKenzie