-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeinstall.yaml
More file actions
30 lines (27 loc) · 788 Bytes
/
deinstall.yaml
File metadata and controls
30 lines (27 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
- name: Deinstall crc
hosts: localhost
connection: local
vars_files: vars.yaml
tasks:
- name: Remove user from kubeconfig
tags: skip_ansible_lint
ansible.builtin.shell: oc logout | true
- name: Remove crc instance
loop:
- crc stop
- crc delete --clear-cache --force
- crc cleanup
ansible.builtin.command: sg libvirt -c "{{ item }}"
- name: Remove files
become: true
loop:
- /tmp/crc-linux-{{ crc_version }}-amd64/
- /usr/local/bin/crc
- /usr/local/bin/oc
ansible.builtin.file:
state: absent
path: "{{ item }}"
- name: Remove user from 'libvirt' group
become: true
ansible.builtin.command: "gpasswd --delete {{ ansible_env.USER }} libvirt"