Commit be25ffe7 authored by Paul's avatar Paul
Browse files

update base_bird role

parent 8bc8e8c5
Pipeline #5102 passed with stage
in 2 minutes and 34 seconds
search luebeck.freifunk.net ffhl
nameserver ::1
nameserver 2001:4860:4860::8888
nameserver 8.8.4.4
# public BGP
#############
protocol bgp ffrhein_fra3 from bgp_public {
neighbor 2a03:2260:0:36::1 as 201701;
}
protocol bgp ffrhein_dus from bgp_public {
neighbor 2a03:2260:0:37::1 as 201701;
}
protocol bgp he from bgp_public {
neighbor 2001:470:12:8::1 as 6939;
}
# dn42
#######
protocol bgp bgp_dn42_chaos from bgp_dn42 {
source address fe80::ac16:fd8c;
neighbor fe80::ac16:fd8b%dn42_chaos as 64784;
}
protocol bgp bgp_dn42_mneme from bgp_dn42 {
neighbor 2a01:4f8:200:71e3:5054:ff:feff:cbce as 76112;
}
protocol bgp bgp_dn42_nbsp_router from bgp_dn42 {
source address 2001:67c:2d50::e01;
neighbor 2001:67c:2d50::2b as 76129;
}
# public BGP
#############
protocol bgp ffrhein_fra3 from bgp_ffrhein {
source address 100.64.0.95;
neighbor 100.64.0.94 as 201701;
}
protocol bgp ffrhein_dus from bgp_ffrhein {
source address 100.64.0.93;
neighbor 100.64.0.92 as 201701;
}
# dn42
#######
protocol bgp bgp_dn42_chaos from bgp_dn42 {
neighbor 172.22.253.139 as 64784;
};
protocol bgp bgp_dn42_mneme from bgp_dn42 {
neighbor 172.23.190.65 as 76112;
};
protocol bgp bgp_nbsp_router from bgp_dn42 {
neighbor 10.130.0.43 as 76129;
};
# public BGP
#############
protocol bgp ffrhein_ber from bgp_public {
neighbor 2a03:2260:0:59::1 as 201701;
}
protocol bgp ffrhein_fra3 from bgp_public {
neighbor 2a03:2260:0:60::1 as 201701;
}
protocol bgp he from bgp_public {
neighbor 2001:470:12:35::1 as 6939;
}
# dn42
#######
protocol bgp bgp_dn42_chaos from bgp_dn42 {
source address fe80::ac16:fd92;
neighbor fe80::ac16:fd91%dn42_chaos as 64784;
}
protocol bgp bgp_nbsp_router from bgp_dn42 {
source address 2001:67c:2d50::c01;
neighbor 2001:67c:2d50::2b as 76129;
}
# public BGP
#############
protocol bgp ffrhein_ber from bgp_ffrhein {
source address 100.64.0.165;
neighbor 100.64.0.164 as 201701;
}
protocol bgp ffrhein_fra3 from bgp_ffrhein {
source address 100.64.0.167;
neighbor 100.64.0.166 as 201701;
}
# dn42
#######
protocol bgp bgp_dn42_chaos from bgp_dn42 {
neighbor 172.22.253.145 as 64784;
}
protocol bgp bgp_dn42_nbsp_router from bgp_dn42 {
neighbor 10.130.0.43 as 76129;
}
protocol bgp bgp_ffmuc from bgp_public {
neighbor fd05:b35:f388::1 as 65102;
}
---
- name: restart bird
systemd:
state: restarted
name: bird.service
- name: restart prometheus-bird-exporter
systemd:
state: restarted
name: prometheus-bird-exporter.service
---
- name: copy base configs
tags: [base, etc, apt]
copy:
src: etc/
dest: /etc
- name: install tools
apt:
autoremove: yes
update_cache: yes
state: present
name:
# necessary packets
- bird2
- prometheus-bird-exporter
- name: copy host specific configs
tags: [bird, etc]
copy:
src: host/{{ inventory_hostname }}/etc/
dest: /etc
---
- name: copy static bird configs
copy: src=bird dest=/etc/
- name: generate and copy host specific bird configs
template: src=bird/bird_host.conf.j2 dest=/etc/bird/bird_host.conf
- name: generate ibgp configs
template: src=bird/bird_ibgp.conf.j2 dest=/etc/bird/bird.conf.d/10-ibgp.conf
- name: restart services
systemd:
daemon_reload: yes
state: restarted
enabled: yes
name: "{{ item }}"
loop:
- bird
- prometheus-bird-exporter
---
- name: install bird and bird exporter
tags: [apt]
apt:
autoremove: yes
update_cache: yes
state: present
name:
- bird2
- prometheus-bird-exporter
- name: prepare
tags: [bird]
import_tasks: base.yml
# BIRD
- name: setup bird2
tags: [bird]
import_tasks: bird.yml
- name: copy static bird configs
tags: [etc]
copy:
src: "{{ item }}"
dest: /etc/bird/
with_fileglob: "bird/*"
notify: restart bird
- name: create bird.conf.d
file:
state: directory
path: /etc/bird/bird.conf.d
- name: copy host specific configs
tags: [etc]
copy:
src: "{{ item }}"
dest: /etc/bird/bird.conf.d/
with_fileglob: "host/{{ inventory_hostname }}/bird.conf.d/*"
notify: restart bird
- name: generate and copy host specific bird configs
template:
src: bird/bird_host.conf.j2
dest: /etc/bird/bird_host.conf
notify: restart bird
- name: generate ibgp configs
template:
src: bird/bird_ibgp.conf.j2
dest: /etc/bird/bird.conf.d/10-ibgp.conf
notify: restart bird
# BIRD exporter
- name: copy prometheus-bird-exporter config
tags: [etc]
copy:
src: prometheus-bird-exporter
dest: /etc/default/
notify: restart prometheus-bird-exporter
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment