Add routes from forrest to tailscale network
This commit is contained in:
parent
df43be6f9b
commit
91a247868b
2 changed files with 23 additions and 0 deletions
|
@ -97,6 +97,7 @@
|
||||||
roles:
|
roles:
|
||||||
- forrest
|
- forrest
|
||||||
- pve_nebula_route
|
- pve_nebula_route
|
||||||
|
- pve_tailscale_route
|
||||||
|
|
||||||
- hosts: qbittorrent
|
- hosts: qbittorrent
|
||||||
roles:
|
roles:
|
||||||
|
|
22
ansible/roles/pve_tailscale_route/tasks/main.yml
Normal file
22
ansible/roles/pve_tailscale_route/tasks/main.yml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
- 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
|
Loading…
Reference in a new issue