2017-09-11 13:10:39 +02:00
|
|
|
---
|
2017-10-04 19:46:16 +02:00
|
|
|
- name: generate initial icvpn_ipv4_peers.conf
|
|
|
|
shell: /usr/bin/python3 /home/admin/clones/icvpn-scripts/mkbgp -4 -f bird -x mwu -d ebgp_icvpn -s /home/admin/clones/icvpn-meta > /etc/bird/icvpn_ipv4_peers.conf
|
2017-09-11 13:10:39 +02:00
|
|
|
args:
|
|
|
|
chdir: /home/admin/clones/icvpn-scripts
|
2017-10-04 19:46:16 +02:00
|
|
|
creates: /etc/bird/icvpn_ipv4_peers.conf
|
|
|
|
notify: reload systemd unit bird
|
|
|
|
|
|
|
|
- name: generate initial icvpn_ipv6_peers.conf
|
|
|
|
shell: /usr/bin/python3 /home/admin/clones/icvpn-scripts/mkbgp -6 -f bird -x mwu -d ebgp_icvpn -s /home/admin/clones/icvpn-meta > /etc/bird/icvpn_ipv6_peers.conf
|
|
|
|
args:
|
|
|
|
chdir: /home/admin/clones/icvpn-scripts
|
|
|
|
creates: /etc/bird/icvpn_ipv6_peers.conf
|
|
|
|
notify: reload systemd unit bird6
|
|
|
|
|
|
|
|
- name: generate initial icvpn_ipv4_roa.conf
|
|
|
|
shell: /usr/bin/python3 /home/admin/clones/icvpn-scripts/mkroa -4 -f bird -x mwu -m 20 -s /home/admin/clones/icvpn-meta > /etc/bird/icvpn_ipv4_roa.conf
|
|
|
|
args:
|
|
|
|
chdir: /home/admin/clones/icvpn-scripts
|
|
|
|
creates: /etc/bird/icvpn_ipv4_roa.conf
|
|
|
|
notify: reload systemd unit bird
|
2017-09-11 13:10:39 +02:00
|
|
|
|
2017-10-04 19:46:16 +02:00
|
|
|
- name: generate initial icvpn_ipv6_roa.conf
|
|
|
|
shell: /usr/bin/python3 /home/admin/clones/icvpn-scripts/mkroa -6 -f bird -x mwu -m 64 -s /home/admin/clones/icvpn-meta > /etc/bird/icvpn_ipv6_roa.conf
|
2017-09-11 13:10:39 +02:00
|
|
|
args:
|
|
|
|
chdir: /home/admin/clones/icvpn-scripts
|
2017-10-04 19:46:16 +02:00
|
|
|
creates: /etc/bird/icvpn_ipv6_roa.conf
|
|
|
|
notify: reload systemd unit bird6
|
2017-09-11 13:10:39 +02:00
|
|
|
|
2017-10-04 19:46:16 +02:00
|
|
|
- name: write icvpn_ipv4.conf
|
2017-09-11 13:10:39 +02:00
|
|
|
template:
|
2017-10-04 19:46:16 +02:00
|
|
|
src: icvpn_ipv4.conf.j2
|
|
|
|
dest: /etc/bird/icvpn_ipv4.conf
|
2017-09-11 13:10:39 +02:00
|
|
|
mode: 0640
|
|
|
|
owner: bird
|
|
|
|
group: bird
|
2017-10-04 19:46:16 +02:00
|
|
|
notify: reload systemd unit bird
|
|
|
|
|
|
|
|
- name: write icvpn_ipv6.conf
|
|
|
|
template:
|
|
|
|
src: icvpn_ipv6.conf.j2
|
|
|
|
dest: /etc/bird/icvpn_ipv6.conf
|
|
|
|
mode: 0640
|
|
|
|
owner: bird
|
|
|
|
group: bird
|
|
|
|
notify: reload systemd unit bird6
|
2017-10-02 23:08:53 +02:00
|
|
|
|
|
|
|
- name: set file attributes for ipv4 roa and peer config
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
mode: 0640
|
2017-10-03 23:31:15 +02:00
|
|
|
owner: admin
|
2017-10-02 23:08:53 +02:00
|
|
|
group: bird
|
2017-10-04 19:46:16 +02:00
|
|
|
notify: reload systemd unit bird
|
2017-10-02 23:08:53 +02:00
|
|
|
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
|
2017-10-03 23:31:15 +02:00
|
|
|
owner: admin
|
2017-10-02 23:08:53 +02:00
|
|
|
group: bird
|
2017-10-04 19:46:16 +02:00
|
|
|
notify: reload systemd unit bird6
|
2017-10-02 23:08:53 +02:00
|
|
|
with_items:
|
|
|
|
- /etc/bird/icvpn_ipv6_peers.conf
|
|
|
|
- /etc/bird/icvpn_ipv6_roa.conf
|
2017-10-03 23:31:15 +02:00
|
|
|
|
2017-10-04 00:25:29 +02:00
|
|
|
- name: write systemd unit icvpn-tinc-bgp-update.service
|
2017-10-03 23:31:15 +02:00
|
|
|
template:
|
2017-10-04 00:25:29 +02:00
|
|
|
src: icvpn-tinc-bgp-update.service.j2
|
|
|
|
dest: /etc/systemd/system/icvpn-tinc-bgp-update.service
|
2017-10-03 23:31:15 +02:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
notify: reload systemd
|
|
|
|
|
2017-10-04 00:25:29 +02:00
|
|
|
- name: write systemd timer icvpn-tinc-bgp-update.timer
|
2017-10-03 23:31:15 +02:00
|
|
|
template:
|
2017-10-04 00:25:29 +02:00
|
|
|
src: icvpn-tinc-bgp-update.timer.j2
|
|
|
|
dest: /etc/systemd/system/icvpn-tinc-bgp-update.timer
|
2017-10-03 23:31:15 +02:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
notify: reload systemd
|
|
|
|
|
2017-10-04 00:25:29 +02:00
|
|
|
- name: configure systemd unit/timer icvpn-tinc-bgp-update
|
2017-10-03 23:31:15 +02:00
|
|
|
systemd:
|
2017-10-04 00:25:29 +02:00
|
|
|
name: icvpn-tinc-bgp-update.timer
|
2017-10-03 23:31:15 +02:00
|
|
|
enabled: yes
|
|
|
|
state: started
|