infrastructure/ansible/roles/pve_tailscale_route/tasks/main.yml
Jake Howard 91a247868b
All checks were successful
/ terraform (push) Successful in 27s
/ ansible (push) Successful in 1m35s
Add routes from forrest to tailscale network
2024-02-07 22:12:08 +00:00

22 lines
412 B
YAML

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