Allow PVE VMs to access nebula hosts via ingress

This commit is contained in:
Jake Howard 2021-01-31 12:19:33 +00:00
parent 643d843bfb
commit 9023b269eb
Signed by: jake
GPG key ID: 57AFB45680EDD477
3 changed files with 25 additions and 0 deletions

View file

@ -44,6 +44,7 @@
- gitea
- duplicati
- yourls
- pve_nebula_route
- hosts: ingress
roles:
@ -58,3 +59,4 @@
become: true
- pve
- zfs
- pve_nebula_route

View 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

View file

@ -0,0 +1 @@
ingress_private_ip: 10.23.1.88