infrastructure/ansible/roles/pve_tailscale_route/tasks/main.yml
Jake Howard d5a7a61171
All checks were successful
/ terraform (push) Successful in 38s
/ ansible (push) Successful in 1m30s
Remove unnecessary use of become from some roles
This should make execution much faster
2024-09-09 17:09:03 +01:00

20 lines
382 B
YAML

- name: Get routes
command:
argv:
- ip
- route
- show
- "{{ tailscale_cidr }}"
register: routes
changed_when: false
- name: Add route to tailscale hosts via ingress
command:
argv:
- ip
- route
- add
- "{{ tailscale_cidr }}"
- via
- "{{ pve_hosts.ingress.ip }}"
when: tailscale_cidr not in routes.stdout