Commit ea9f396b authored by nanahira's avatar nanahira

use dynamic babeld

parent 5d65f431
......@@ -123,13 +123,13 @@
template:
src: babeld.conf.j2
dest: '{{ansible_user_dir}}/nextgen-network/services/babeld.conf'
notify: restart_babeld
#notify: restart_babeld
when: not noBird
#- name: babeld reload conf
# template:
# src: babeld-reload.conf.j2
# dest: /tmp/babeld-reload.conf
# notify: reload_babeld
- name: babeld reload conf
template:
src: babeld-reload.conf.j2
dest: /tmp/babeld-reload.conf
notify: reload_babeld
- name: frps conf
template:
src: protocols/wgfrp/frps.ini.j2
......@@ -162,7 +162,7 @@
template:
src: babeld.conf.j2
dest: '/etc/babeld.conf'
notify: restart_babeld_systemd
#notify: restart_babeld_systemd
when: systemBird
- name: enable systemd babeld
become: true
......@@ -183,13 +183,13 @@
services:
- bird
when: not noBird
- name: restart_babeld # ocserv would be always restarted whenever key changes..
docker_compose:
project_src: '{{ansible_user_dir}}/nextgen-network/services'
restarted: true
services:
- babeld
when: not noBird
#- name: restart_babeld # ocserv would be always restarted whenever key changes..
# docker_compose:
# project_src: '{{ansible_user_dir}}/nextgen-network/services'
# restarted: true
# services:
# - babeld
# when: not noBird
- name: reload_babeld
shell: cat /tmp/babeld-reload.conf | nc ::1 33123
- name: restart_frps
......@@ -227,11 +227,11 @@
systemd:
name: bird
state: restarted
- name: restart_babeld_systemd
become: true
systemd:
name: babeld
state: restarted
#- name: restart_babeld_systemd
# become: true
# systemd:
# name: babeld
# state: restarted
- name: reload_chnroute
become: true
shell: |
......
......@@ -28,7 +28,7 @@ _strip_wg_conf() {
# _strip_wg_conf ./protocols/wg/wg.conf.j2 ./protocols/wg/wg-setconf.conf.j2
_strip_wg_conf ./protocols/wgfrp/wgfrp.conf.j2 ./protocols/wgfrp/wgfrp-setconf.conf.j2
cat babeld.conf.j2 > babeld-reload.conf.j2
sed -r '/^(#.*)?$/d;/^reflect-kernel-metric/d;/^local-port-readwrite/d' babeld.conf.j2 > babeld-reload.conf.j2
echo 'quit' >> babeld-reload.conf.j2
ansible-playbook -i ../result/inventory.yaml "$@" configure.yaml
......
Markdown is supported
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