Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding uninstall playbook #1

Merged
merged 1 commit into from
Apr 5, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions playbooks/uninstall.yml
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/*