diff options
author | Christian Pointner <equinox@spreadspace.org> | 2020-06-20 19:39:23 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2020-06-20 19:39:23 +0200 |
commit | 954d477be41072cf8a8a4260a8fe46f66674c117 (patch) | |
tree | b5102e0d8f06088fb2c58072a63b31568ed9ced4 /roles/kubernetes/kubeadm/reset/tasks/net_kubeguard.yml | |
parent | add ch-equinox-ws to managment vlan (diff) | |
parent | kubernetes: add network-plugin kube-router (diff) |
Merge branch 'topic/kubernetes-network-plugins'
Diffstat (limited to 'roles/kubernetes/kubeadm/reset/tasks/net_kubeguard.yml')
-rw-r--r-- | roles/kubernetes/kubeadm/reset/tasks/net_kubeguard.yml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/roles/kubernetes/kubeadm/reset/tasks/net_kubeguard.yml b/roles/kubernetes/kubeadm/reset/tasks/net_kubeguard.yml new file mode 100644 index 00000000..bcb48960 --- /dev/null +++ b/roles/kubernetes/kubeadm/reset/tasks/net_kubeguard.yml @@ -0,0 +1,26 @@ +--- +- name: check if kubeguard interface service unit exists + stat: + path: /etc/systemd/system/kubeguard-interface.service + register: kubeguard_interface_unit + +- name: bring down kubeguard interface + when: kubeguard_interface_unit.stat.exists + systemd: + name: kubeguard-interface.service + state: stopped + +- name: gather list of all kubeguard related service units + find: + path: /etc/systemd/system/ + patterns: + - "kubeguard-peer-*.service" + - kubeguard-interface.service + register: kubeguard_units_installed + +- name: remove all kubeguard related files and directories + loop: "{{ kubeguard_units_installed.files | map(attribute='path') | list | flatten | union(['/var/lib/kubeguard']) }}" + file: + path: "{{ item }}" + state: absent + notify: reload systemd |