-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from huddlesj/jay-uninstall
adding uninstall playbook
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
|
||
- import_playbook: /usr/share/ansible/openshift-ansible/playbooks/adhoc/uninstall.yml | ||
|
||
- name: Tasks for all hosts | ||
hosts: all | ||
ignore_errors: yes | ||
tasks: | ||
- name: Stop Docker | ||
shell: /usr/bin/docker stop `docker ps -a -q` | ||
- name: Remove Docker containers | ||
shell: /usr/bin/docker rm `docker ps -a -q` | ||
- name: Remove Docker volumes | ||
shell: /usr/bin/docker volume rm $(/usr/bin/docker volume ls -q --filter dangling=true) | ||
- name: Remove Docker Images | ||
shell: /usr/bin/docker rmi --force $(/usr/bin/docker images -q) | ||
- name: Remove master folder | ||
file: path=/etc/origin/master state=absent | ||
- name: Remove node folder | ||
file: path=/etc/origin/node state=absent | ||
|
||
- name: Tasks for gluster nodes | ||
hosts: glusterfs | ||
tasks: | ||
- name: clear glusterfs drives | ||
command: dd if=/dev/zero of=/dev/sdc count=1000 bs=1M | ||
ignore_errors: yes | ||
- name: clear heketi folder | ||
command: rm -rf /var/lib/heketi/* | ||
- name: clear glusterd vols | ||
command: rm -rf /var/lib/glusterd/vols/* |