kedge/ansible/roles/kedge_tunnel/tasks/main.yml
Tyler King 3db2f3b0c7 feat: kedge_tunnel Ansible role
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 15:55:19 -04:00

23 lines
699 B
YAML

---
# Map WireGuard tunnel to Kedge governed overlay.
# Creates a KedgeTunnel CR that binds the WireGuard interface to a VNI.
- name: Ensure kubectl is available
ansible.builtin.command: kubectl version --client
changed_when: false
- name: Deploy KedgeTunnel manifest
ansible.builtin.template:
src: kedge-tunnel.yml.j2
dest: "/tmp/kedge-tunnel-{{ kedge_tunnel_site_id }}.yml"
mode: "0644"
- name: Apply KedgeTunnel CR
ansible.builtin.command: >
kubectl apply -f /tmp/kedge-tunnel-{{ kedge_tunnel_site_id }}.yml
changed_when: true
- name: Clean up temporary manifest
ansible.builtin.file:
path: "/tmp/kedge-tunnel-{{ kedge_tunnel_site_id }}.yml"
state: absent