2021-10-25 11:24:40 +00:00
|
|
|
---
|
2021-10-25 11:55:25 +00:00
|
|
|
- name: Install bird
|
2021-10-25 11:24:40 +00:00
|
|
|
package:
|
|
|
|
name: bird
|
|
|
|
state: present
|
|
|
|
|
2021-10-25 11:55:25 +00:00
|
|
|
- name: Add bird config
|
2021-10-25 11:24:40 +00:00
|
|
|
template:
|
|
|
|
src: bird.conf.j2
|
|
|
|
dest: /etc/bird.conf
|
|
|
|
notify:
|
|
|
|
- restart bird
|
|
|
|
|
2021-10-25 11:55:25 +00:00
|
|
|
- name: Add dummy interface and add IPs
|
|
|
|
community.general.nmcli:
|
|
|
|
type: lo0
|
|
|
|
conn_name: 'lo0'
|
|
|
|
ip4: '{{ item.ip }}'
|
|
|
|
gw4: '{{ item.gw }}'
|
|
|
|
state: present
|
2021-10-25 11:24:40 +00:00
|
|
|
notify:
|
2021-10-25 11:55:25 +00:00
|
|
|
- reload dummy interface
|
|
|
|
loop: '{{ bird.bgp.static|subelements(networks[ansible_fqdn]) }}'
|
2021-10-25 11:24:40 +00:00
|
|
|
|
|
|
|
- name: start bird service
|
|
|
|
systemd:
|
|
|
|
name: bird
|
|
|
|
state: started
|
|
|
|
enabled: yes
|
|
|
|
daemon_reload: yes
|