Commit ea9f396b authored by nanahira's avatar nanahira

use dynamic babeld

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