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

61 lines
1.1 KiB
YAML
Raw Normal View History

2017-09-10 23:56:34 +02:00
---
- 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.conf
2017-09-10 23:56:34 +02:00
template:
src: bird.conf.j2
dest: /etc/bird/bird.conf
2017-09-10 23:56:34 +02:00
mode: 0640
owner: bird
group: bird
notify: reload systemd unit bird
2017-09-10 23:56:34 +02:00
- name: write bird6.conf
2017-09-10 23:56:34 +02:00
template:
src: bird6.conf.j2
dest: /etc/bird/bird6.conf
2017-09-10 23:56:34 +02:00
mode: 0640
owner: bird
group: bird
notify: reload systemd unit bird6
- name: write mwu_ipv4_peers.conf
template:
src: mwu_ipv4_peers.conf.j2
dest: /etc/bird/mwu_ipv4_peers.conf
mode: 0640
owner: bird
group: bird
notify: reload systemd unit bird
- name: write mwu_ipv6_peers.conf
template:
src: mwu_ipv6_peers.conf.j2
dest: /etc/bird/mwu_ipv6_peers.conf
mode: 0640
owner: bird
group: bird
notify: reload systemd unit bird6
2017-09-10 23:56:34 +02:00
- name: enable + start systemd units bird + bird6
systemd:
name: bird{{ item }}
enabled: yes
state: started
with_items:
- ""
- 6