fix: bootstrap tailscale namespace before secret
Some checks failed
Deploy Cluster / Terraform (push) Successful in 44s
Deploy Cluster / Ansible (push) Failing after 3m30s

This commit is contained in:
2026-03-20 09:24:35 +00:00
parent 522626a52b
commit 349f75729a

View File

@@ -9,6 +9,25 @@
no_log: true no_log: true
when: hcloud_token | default('') | length > 0 when: hcloud_token | default('') | length > 0
- name: Ensure Tailscale operator namespace exists
command: >-
kubectl create namespace {{ tailscale_operator_namespace | default('tailscale-system') }}
--dry-run=client -o yaml
register: tailscale_namespace_manifest
changed_when: false
when:
- tailscale_oauth_client_id | default('') | length > 0
- tailscale_oauth_client_secret | default('') | length > 0
- name: Apply Tailscale operator namespace
command: kubectl apply -f -
args:
stdin: "{{ tailscale_namespace_manifest.stdout }}"
changed_when: true
when:
- tailscale_oauth_client_id | default('') | length > 0
- tailscale_oauth_client_secret | default('') | length > 0
- name: Apply Tailscale operator OAuth secret - name: Apply Tailscale operator OAuth secret
shell: >- shell: >-
kubectl -n {{ tailscale_operator_namespace | default('tailscale-system') }} create secret generic operator-oauth kubectl -n {{ tailscale_operator_namespace | default('tailscale-system') }} create secret generic operator-oauth