Skip to content

Commit

Permalink
chore: Update tldraw-server tasks to conditionally apply changes (#11)
Browse files Browse the repository at this point in the history
The tldraw-server tasks in the ansible role have been updated to conditionally apply changes based on the value of the WITH_TLDRAW2 variable. This change ensures that the server-svc.yml.j2, pod-monitor.yml.j2, and ingress.yml.j2 templates are only applied when WITH_TLDRAW2 is defined and evaluates to true.
  • Loading branch information
SevenWaysDP authored Aug 28, 2024
1 parent 883c265 commit 7cd2d4d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ansible/roles/tldraw-server/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: server-svc.yml.j2
state: "{{ 'present' if WITH_TLDRAW2 else 'absent'}}"
when: WITH_TLDRAW2 is defined and WITH_TLDRAW2|bool
tags:
- service

Expand All @@ -52,7 +52,7 @@
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: pod-monitor.yml.j2
state: "{{ 'present' if WITH_TLDRAW2 else 'absent'}}"
when: WITH_TLDRAW2 is defined and WITH_TLDRAW2|bool
tags:
- prometheus

Expand All @@ -62,6 +62,6 @@
namespace: "{{ NAMESPACE }}"
template: ingress.yml.j2
apply: yes
state: "{{ 'present' if WITH_TLDRAW2 else 'absent'}}"
when: WITH_TLDRAW2 is defined and WITH_TLDRAW2|bool
tags:
- ingress

0 comments on commit 7cd2d4d

Please sign in to comment.