forked from ansible_roles/dn42
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
700 B
YAML
36 lines
700 B
YAML
---
|
|
#- import_tasks: bird-repos.yml
|
|
- name: Install bird2
|
|
apt:
|
|
name: "bird2"
|
|
state: present
|
|
|
|
- name: Copy bird config-file
|
|
template:
|
|
dest: /etc/bird/bird.conf
|
|
src: "bird2/bird.conf.j2"
|
|
notify: reload bird
|
|
|
|
- name: Ensure birds peer foler exists
|
|
file:
|
|
path: "/etc/bird/peers"
|
|
state: directory
|
|
owner: "bird"
|
|
group: "bird"
|
|
|
|
- name: Copy birds peer config-files
|
|
template:
|
|
dest: "/etc/bird/peers/{{ peer.name }}.conf"
|
|
src: "bird2/peer.conf.j2"
|
|
loop: "{{ dn42_peers }}"
|
|
loop_control:
|
|
loop_var: "peer"
|
|
notify: reload bird
|
|
|
|
- name: Ensure bird service is enabled and started
|
|
systemd:
|
|
name: "bird.service"
|
|
enabled: yes
|
|
state: started
|
|
|