2021-01-31 12:19:33 +00:00
|
|
|
- name: Get routes
|
|
|
|
command:
|
|
|
|
argv:
|
|
|
|
- ip
|
|
|
|
- route
|
|
|
|
- show
|
2021-01-31 12:46:43 +00:00
|
|
|
- "{{ nebula.cidr }}"
|
2021-01-31 12:19:33 +00:00
|
|
|
register: routes
|
|
|
|
changed_when: false
|
|
|
|
become: true
|
|
|
|
|
|
|
|
- name: Add route to nebula hosts via ingress
|
|
|
|
command:
|
|
|
|
argv:
|
|
|
|
- ip
|
|
|
|
- route
|
|
|
|
- add
|
2021-01-31 12:46:43 +00:00
|
|
|
- "{{ nebula.cidr }}"
|
2021-01-31 12:19:33 +00:00
|
|
|
- via
|
2021-01-31 12:46:43 +00:00
|
|
|
- "{{ pve_hosts.ingress.internal_ip }}"
|
2021-01-31 12:19:33 +00:00
|
|
|
become: true
|
2021-01-31 12:46:43 +00:00
|
|
|
when: nebula.cidr not in routes.stdout
|