infrastructure/ansible/roles/pve_nebula_route/tasks/main.yml
Jake Howard 058290b321
Keep track of IPs for PVE hosts
Yea they're all random, I'll deal with that later
2021-01-31 12:46:43 +00:00

23 lines
409 B
YAML

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