summaryrefslogtreecommitdiff
path: root/roles/kubernetes/kubeadm/prune/tasks/net_kubeguard.yml
blob: 8a8c7752b01eb115c6bcd494e8f82863fd045260 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
---
- name: stop/disable systemd units for stale kubeguard peers
  loop: "{{ groups['_kubernetes_nodes_prune_'] | default([]) }}"
  systemd:
    name: "kubeguard-peer-{{ item }}.service"
    state: stopped
    enabled: no
  failed_when: false

- name: remove systemd units for stale kubeguard peers
  loop: "{{ groups['_kubernetes_nodes_prune_'] | default([]) }}"
  file:
    name: "/etc/systemd/system/kubeguard-peer-{{ item }}.service"
    state: absent