Commit 523d202d authored by nanahira's avatar nanahira

tcp reload

parent 37fc528b
...@@ -115,5 +115,6 @@ dist ...@@ -115,5 +115,6 @@ dist
*.retry *.retry
wgfrp-setconf.conf.j2 wgfrp-setconf.conf.j2
certs certs
babeld-reload.conf.j2
__pycache__ __pycache__
...@@ -108,8 +108,13 @@ ...@@ -108,8 +108,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: reload_babeld
# when: not noBird when: not noBird
- name: babeld reload conf
template:
src: babeld-reload.conf.j2
dest: /tmp/babeld-reload.conf
notify: reload_babeld
- name: frps conf - name: frps conf
template: template:
src: protocols/wgfrp/frps.ini.j2 src: protocols/wgfrp/frps.ini.j2
...@@ -137,6 +142,21 @@ ...@@ -137,6 +142,21 @@
enabled: true enabled: true
masked: false masked: false
when: systemBird when: systemBird
- name: systemd babeld conf
become: true
template:
src: babeld.conf.j2
dest: '/etc/babeld.conf'
# notify: reload_babeld
when: systemBird
- name: enable systemd babeld
become: true
systemd:
name: babeld
state: started
enabled: true
masked: false
when: systemBird
handlers: handlers:
- name: reload_switch_rules - name: reload_switch_rules
become: true become: true
...@@ -148,13 +168,8 @@ ...@@ -148,13 +168,8 @@
services: services:
- bird - bird
when: not noBird when: not noBird
- name: restart_babeld - name: reload_babeld
docker_compose: shell: cat /tmp/babeld-reload.conf | nc ::1 33123
project_src: '{{ansible_user_dir}}/nextgen-network/services'
restarted: true
services:
- babeld
# when: not noBird
- name: restart_frps - name: restart_frps
docker_compose: docker_compose:
project_src: '{{ansible_user_dir}}/nextgen-network/services' project_src: '{{ansible_user_dir}}/nextgen-network/services'
......
...@@ -11,3 +11,25 @@ ...@@ -11,3 +11,25 @@
- fatedier/frps:v0.34.2 - fatedier/frps:v0.34.2
- fatedier/frpc:v0.34.2 - fatedier/frpc:v0.34.2
- git-registry.mycard.moe/nanahira/docker-bird - git-registry.mycard.moe/nanahira/docker-bird
- name: unstable source
become: true
copy:
content: |
deb http://mirrors.tuna.tsinghua.edu.cn/debian unstable main contrib non-free
dest: /etc/apt/sources.list.d/unstable.list
when: systemBird and ansible_distribution == 'Debian'
- name: unstable pref 90
become: true
copy:
content: |
Package: *
Pin: release a=unstable
Pin-Priority: 90
dest: /etc/apt/preferences.d/limit-unstable
when: systemBird and ansible_distribution == 'Debian'
- name: install packages for systemd things
become: true
apt:
update_cache: true
name: babeld,bird2
when: systemBird
...@@ -28,6 +28,9 @@ _strip_wg_conf() { ...@@ -28,6 +28,9 @@ _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
echo 'quit' >> babeld-reload.conf.j2
ansible-playbook -i ../result/inventory.yaml "$@" configure.yaml ansible-playbook -i ../result/inventory.yaml "$@" configure.yaml
cd .. cd ..
......
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