Allow PVE VMs to access nebula hosts via ingress
This commit is contained in:
parent
643d843bfb
commit
9023b269eb
3 changed files with 25 additions and 0 deletions
|
@ -44,6 +44,7 @@
|
||||||
- gitea
|
- gitea
|
||||||
- duplicati
|
- duplicati
|
||||||
- yourls
|
- yourls
|
||||||
|
- pve_nebula_route
|
||||||
|
|
||||||
- hosts: ingress
|
- hosts: ingress
|
||||||
roles:
|
roles:
|
||||||
|
@ -58,3 +59,4 @@
|
||||||
become: true
|
become: true
|
||||||
- pve
|
- pve
|
||||||
- zfs
|
- zfs
|
||||||
|
- pve_nebula_route
|
||||||
|
|
22
ansible/roles/pve_nebula_route/tasks/main.yml
Normal file
22
ansible/roles/pve_nebula_route/tasks/main.yml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
- name: Get routes
|
||||||
|
command:
|
||||||
|
argv:
|
||||||
|
- ip
|
||||||
|
- route
|
||||||
|
- show
|
||||||
|
- "{{ nebula.subnet }}"
|
||||||
|
register: routes
|
||||||
|
changed_when: false
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Add route to nebula hosts via ingress
|
||||||
|
command:
|
||||||
|
argv:
|
||||||
|
- ip
|
||||||
|
- route
|
||||||
|
- add
|
||||||
|
- "{{ nebula.subnet }}"
|
||||||
|
- via
|
||||||
|
- "{{ ingress_private_ip }}"
|
||||||
|
become: true
|
||||||
|
when: nebula.subnet not in routes.stdout
|
1
ansible/roles/pve_nebula_route/vars/main.yml
Normal file
1
ansible/roles/pve_nebula_route/vars/main.yml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
ingress_private_ip: 10.23.1.88
|
Loading…
Reference in a new issue