Commit b9e17bb1 authored by nanahira's avatar nanahira

add noBird and systemBird

parent 57355cdf
......@@ -91,22 +91,40 @@
copy:
content: '{{dockerServices | to_yaml}}'
dest: '{{ansible_user_dir}}/nextgen-network/services/docker-compose.yml'
when: not noBird and not systemBird
- 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
- name: frps conf
template:
src: protocols/wgfrp/frps.ini.j2
dest: '{{ansible_user_dir}}/nextgen-network/services/frps.ini'
when: frpsNeeded
when: frpsNeeded and not noBird and not systemBird
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
- name: systemd bird
become: true
template:
src: bird.conf.j2
dest: '/etc/bird/bird.conf'
notify: restart_bird_systemd
when: systemBird
- name: enable systemd bird
become: true
systemd:
name: bird
state: started
enabled: true
masked: false
when: systemBird
handlers:
- name: reload_switch_rules
become: true
......@@ -131,3 +149,8 @@
- frpc-{{item.name}}
with_items: '{{connections}}'
when: 'item.protocol == "wgfrp" and item.frpType == "frpc"'
- name: restart_bird_systemd
become: true
systemd:
name: bird
state: restarted
......@@ -181,7 +181,9 @@ class InventoryBuilder {
lanInterfaces,
masqInterfaces,
dockerServices: host.dockerServices,
routePlans
routePlans,
noBird: !!(host.noBird || host.systemBird),
systemBird: !!host.systemBird
};
}
......
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