Commit c7673594 authored by 神楽坂玲奈's avatar 神楽坂玲奈

bird

parent 81e3c26f
......@@ -12,26 +12,28 @@
src: scripts/predown.sh
dest: '/etc/wireguard/predown.sh'
mode: a+x
# 为了提高测试时候的性能,不改动wg的时候注释掉这段
- name: 'loop through list from a variable'
include_tasks: 'protocols/{{item.protocol}}/{{item.protocol}}.yaml'
vars:
conn: '{{item}}'
with_items: '{{ connections }}'
- name: 安装软件包 (apt)
apt:
name: bird2
state: latest
when: ansible_os_family == "Debian"
# - name: 安装软件包 (apt)
# apt:
# name: bird2
# state: latest
# when: ansible_os_family == "Debian"
# - name: 安装软件包 (yum)
# yum:
# name: bird2
# state: latest
# when: ansible_os_family == "RedHat"
- name: 鸟配置 (apt)
template:
src: bird.conf.j2
dest: '/etc/bird/bird.conf'
when: ansible_os_family == "Debian"
- name: 安装软件包 (yum)
yum:
name: bird2
state: latest
when: ansible_os_family == "RedHat"
- name: 鸟配置 (yum)
template:
src: bird.conf.j2
......
......@@ -77,8 +77,8 @@ class InventoryBuilder {
const localPort = primary ? remote.port : remote.port2;
const remotePort = primary ? local.port : local.port2;
const wgPublicKey = remote.wgPublickey;
const localPeerAddress = primary ? local.peerAddress : local.peerAddress2;
const remotePeerAddress = primary ? remote.peerAddress : remote.peerAddress2;
const localPeerAddress = primary ? `10.200.${local.id}.${remote.id}` : `10.201.${local.id}.${remote.id}`;
const remotePeerAddress = primary ? `10.200.${remote.id}.${local.id}` : `10.201.${remote.id}.${local.id}`;
return {
name,
metric,
......
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