60 lines
1.6 KiB
YAML
60 lines
1.6 KiB
YAML
---
|
|
- name: write initial icvpn peers
|
|
shell: /usr/bin/python3 /home/admin/clones/icvpn-scripts/mkbgp -{{ item }} -f bird -x mwu -d ebgp_icvpn -s /home/admin/clones/icvpn-meta > /etc/bird/icvpn_ipv{{ item }}_peers.conf
|
|
args:
|
|
chdir: /home/admin/clones/icvpn-scripts
|
|
creates: /etc/bird/icvpn_ipv{{ item }}_peers.conf
|
|
notify:
|
|
- reload bird{{ item }}
|
|
with_items:
|
|
- 4
|
|
- 6
|
|
|
|
- name: write initial icvpn roa config
|
|
shell: /usr/bin/python3 /home/admin/clones/icvpn-scripts/mkroa -{{ item.key }} -f bird -x mwu -m {{ item.value.max_prefix }} -s /home/admin/clones/icvpn-meta > /etc/bird/icvpn_ipv{{ item.key }}_roa.conf
|
|
args:
|
|
chdir: /home/admin/clones/icvpn-scripts
|
|
creates: /etc/bird/icvpn_ipv{{ item.key }}_roa.conf
|
|
notify:
|
|
- reload bird{{ item.key }}
|
|
with_dict:
|
|
4:
|
|
max_prefix: 20
|
|
6:
|
|
max_prefix: 64
|
|
|
|
- name: write icvpn bird configuration
|
|
template:
|
|
src: icvpn_ipv{{ item }}.conf.j2
|
|
dest: /etc/bird/icvpn_ipv{{ item }}.conf
|
|
mode: 0640
|
|
owner: bird
|
|
group: bird
|
|
notify: reload bird{{ item }}
|
|
with_items:
|
|
- 4
|
|
- 6
|
|
|
|
- name: set file attributes for ipv4 roa and peer config
|
|
file:
|
|
path: "{{ item }}"
|
|
mode: 0640
|
|
owner: bird
|
|
group: bird
|
|
notify:
|
|
- reload bird4
|
|
with_items:
|
|
- /etc/bird/icvpn_ipv4_peers.conf
|
|
- /etc/bird/icvpn_ipv4_roa.conf
|
|
|
|
- name: set file attributes for ipv6 roa and peer config
|
|
file:
|
|
path: "{{ item }}"
|
|
mode: 0640
|
|
owner: bird
|
|
group: bird
|
|
notify:
|
|
- reload bird6
|
|
with_items:
|
|
- /etc/bird/icvpn_ipv6_peers.conf
|
|
- /etc/bird/icvpn_ipv6_roa.conf
|