devops-shit/ansible/trash/gluster-ansible/destroy.yml

43 lines
787 B
YAML

---
- hosts: playgrounds
become: true
become_user: root
tasks:
- name: Copy hosts
template:
src: hosts
dest: /etc/hosts
- name: Copy sudoers
template:
src: sudoers
dest: /etc/sudoers
# - name: stop gluster volume
# gluster.gluster.gluster_volume:
# state: absent
# name: gv0
- name: remove gluster volume
gluster.gluster.gluster_volume:
state: absent
name: gv0
bricks: /gl
force: yes
- name: stop glusterd
ansible.builtin.systemd:
name: glusterd.service
state: stopped
enabled: no
- name: remove glusterfs
apt:
name: glusterfs-server
state: absent
update_cache: yes