ansible-ffibk/roles/service-bird-icvpn/tasks/main.yml

39 lines
1.1 KiB
YAML
Raw Normal View History

---
- 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 }}
- set file attrs {{ 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 }}
- set file attrs {{ 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