mirror of
https://gitea.0xace.cc/ansible-galaxy/bird.git
synced 2024-11-25 08:06:38 +00:00
31 lines
576 B
YAML
31 lines
576 B
YAML
---
|
|
- name: Install bird
|
|
package:
|
|
name: bird
|
|
state: present
|
|
|
|
- name: Add bird config
|
|
template:
|
|
src: bird.conf.j2
|
|
dest: /etc/bird.conf
|
|
notify:
|
|
- restart bird
|
|
|
|
- name: Add dummy interface and add IPs
|
|
community.general.nmcli:
|
|
type: lo0
|
|
conn_name: 'lo0'
|
|
ip4: '{{ item.ip }}'
|
|
gw4: '{{ item.gw }}'
|
|
state: present
|
|
notify:
|
|
- reload dummy interface
|
|
loop: '{{ bird.bgp.static|subelements(networks[ansible_fqdn]) }}'
|
|
|
|
- name: start bird service
|
|
systemd:
|
|
name: bird
|
|
state: started
|
|
enabled: yes
|
|
daemon_reload: yes
|