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

72 lines
1.3 KiB
YAML
Raw Normal View History

2017-09-10 23:56:34 +02:00
---
- name: install bird packages
package:
2017-09-10 23:56:34 +02:00
name: "{{ item }}"
state: present
loop:
2017-09-10 23:56:34 +02:00
- 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
tags: sync-peers
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
tags: sync-peers
notify: reload systemd unit bird6
2017-09-10 23:56:34 +02:00
- name: write radv.conf
2019-03-02 18:10:48 +01:00
when: server_type == "gateway"
template:
src: radv.conf.j2
dest: /etc/bird/radv.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
loop:
2017-09-10 23:56:34 +02:00
- ""
- 6