Skip to content

Commit

Permalink
update ansible role tasks to delete existing resourses
Browse files Browse the repository at this point in the history
  • Loading branch information
sdinkov committed Feb 4, 2025
1 parent cdca4b2 commit b9376ff
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions ansible/roles/shd-client-core/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: svc.yml.j2
state: "{{ WITH_SHD_CLIENT|bool else 'absent' }}"
state: absent
when: WITH_SHD_CLIENT is not defined or not WITH_SHD_CLIENT | bool
tags:
- service

Expand All @@ -13,7 +14,8 @@
namespace: "{{ NAMESPACE }}"
template: configmap.yml.j2
apply: yes
state: "{{ WITH_SHD_CLIENT|bool else 'absent' }}"
state: absent
when: WITH_SHD_CLIENT is not defined or not WITH_SHD_CLIENT | bool
tags:
- configmap

Expand All @@ -22,7 +24,8 @@
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: deployment.yml.j2
state: "{{ WITH_SHD_CLIENT|bool else 'absent' }}"
state: absent
when: WITH_SHD_CLIENT is not defined or not WITH_SHD_CLIENT | bool
tags:
- deployment

Expand All @@ -31,6 +34,7 @@
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: ingress.yml.j2
state: "{{ WITH_SHD_CLIENT|bool else 'absent' }}"
state: absent
when: WITH_SHD_CLIENT is not defined or not WITH_SHD_CLIENT | bool
tags:
- ingress

0 comments on commit b9376ff

Please sign in to comment.