48 lines
887 B
YAML
48 lines
887 B
YAML
---
|
|
- name: install bird packages
|
|
apt:
|
|
name: "{{ item }}"
|
|
state: present
|
|
notify: reload systemd
|
|
with_items:
|
|
- bird-bgp
|
|
- bird-doc
|
|
|
|
- name: set directory permissions for /etc/bird
|
|
file:
|
|
path: /etc/bird
|
|
state: directory
|
|
mode: 0755
|
|
|
|
- name: write bird configuration
|
|
template:
|
|
src: bird{{ item }}.conf.j2
|
|
dest: /etc/bird/bird{{ item }}.conf
|
|
mode: 0640
|
|
owner: bird
|
|
group: bird
|
|
notify: reload bird{{ item }}
|
|
with_items:
|
|
- ""
|
|
- 6
|
|
|
|
- name: configure mwu peers
|
|
template:
|
|
src: mwu_ipv{{ item }}_peers.conf.j2
|
|
dest: /etc/bird/mwu_ipv{{ item }}_peers.conf
|
|
mode: 0640
|
|
owner: bird
|
|
group: bird
|
|
notify: reload bird{{ item }}
|
|
with_items:
|
|
- 4
|
|
- 6
|
|
|
|
- name: enable + start systemd units bird + bird6
|
|
systemd:
|
|
name: bird{{ item }}
|
|
enabled: yes
|
|
state: started
|
|
with_items:
|
|
- ""
|
|
- 6
|