Commit 663bb7a1 authored by nanahira's avatar nanahira

simplify

parent 22cd8097
......@@ -78,7 +78,7 @@
with_items: '{{routeLists.mycard}}'
- name: ocserv pre-configure
include_tasks: 'protocols/oc/ocserv-pre.yaml'
when: ocservNeeded and not noBird and not systemBird
when: ocservNeeded and not noBird
# 为了提高测试时候的性能,不改动wg的时候注释掉这段
- name: 'clean up null connections first'
include_tasks: 'protocols/{{item.protocol}}/configure.yaml'
......@@ -97,25 +97,25 @@
copy:
content: '{{dockerServices | to_yaml}}'
dest: '{{ansible_user_dir}}/nextgen-network/services/docker-compose.yml'
when: not noBird and not systemBird
when: not noBird
- name: bird conf
template:
src: bird.conf.j2
dest: '{{ansible_user_dir}}/nextgen-network/services/bird.conf'
notify: restart_bird
when: not noBird and not systemBird
when: not noBird
- name: frps conf
template:
src: protocols/wgfrp/frps.ini.j2
dest: '{{ansible_user_dir}}/nextgen-network/services/frps.ini'
when: frpsNeeded and not noBird and not systemBird
when: frpsNeeded and not noBird
notify: restart_frps
- name: start services
docker_compose:
project_src: '{{ansible_user_dir}}/nextgen-network/services'
remove_orphans: true
# pull: true
when: not noBird and not systemBird
when: not noBird
- name: systemd bird
become: true
template:
......@@ -141,14 +141,14 @@
restarted: true
services:
- bird
when: not noBird and not systemBird
when: not noBird
- name: restart_frps
docker_compose:
project_src: '{{ansible_user_dir}}/nextgen-network/services'
restarted: true
services:
- frps
when: not noBird and not systemBird
when: not noBird
- name: restart_frpc
docker_compose:
project_src: '{{ansible_user_dir}}/nextgen-network/services'
......@@ -156,14 +156,14 @@
services:
- frpc-{{item.name}}
with_items: '{{connections}}'
when: 'item.protocol == "wgfrp" and item.frpType == "frpc"' and not noBird and not systemBird
when: 'item.protocol == "wgfrp" and item.frpType == "frpc"' and not noBird
- name: restart_ocserv
docker_compose:
project_src: '{{ansible_user_dir}}/nextgen-network/services'
restarted: true
services:
- ocserv
when: not noBird and not systemBird
when: not noBird
- name: restart_openconnect
docker_compose:
project_src: '{{ansible_user_dir}}/nextgen-network/services'
......@@ -171,7 +171,7 @@
services:
- openconnect-{{item.name}}
with_items: '{{connections}}'
when: 'item.protocol == "oc" and item.ocType == "client"' and not noBird and not systemBird
when: 'item.protocol == "oc" and item.ocType == "client"' and not noBird
- name: restart_bird_systemd
become: true
systemd:
......
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