Commit 28fb69b3 authored by nanahira's avatar nanahira

rewrite nextgen-router inventory

parent aa6ba4fd
......@@ -4,7 +4,7 @@ mycard:
children:
router_nextgen:
rcloud:
vars:
vars: # 一般可以什么都不改,想改的话改什么抄什么
ansible_ssh_user: root
ansible_python_interpreter: python3
authorized_keys: |
......@@ -42,89 +42,104 @@ rcloud:
tls_dns:
- 8.8.8.8
- 8.8.4.4
https_dns:
- cloudflare-dns.com
- dns.quad9.net
china_dns:
- 114.114.114.114
- 223.5.5.5
router_nextgen:
hosts:
example-2.com:
vars:
example-2.com: # 在这里的基本上都是需要改的
links:
- name: eno1 # 物理网卡
bonds: # 没有可以删
- name: bond0 # bond,一般用mode 4来LACP
links:
- eno1
mode: 4
vlans: # 没有可以删
- link: bond0 # vlan,只需要写link和tag,最后网卡名字会变成 link.tag
tag: 2
- link: bond0
tag: 3
- link: bond0
tag: 41
- link: bond0
tag: 46
bridges: # bridge,IP只能在这里配
- name: brlan # 名称
links:
- bond0 # 上行链路
type: static # dhcp还是static,manual理论上也可以
address: 10.0.0.1/24 # 首选地址
moreAddresses:
- 10.0.0.2/24 # 备选地址
gateways: null # 网关,看下面
masq: false # 是否MASQ
stp: false # 是否开启STP,默认false
linkUp: echo 'link up' # 链路启动脚本,用于奇怪的特殊链路或者netns
up: echo "up" # 启动脚本和关闭脚本
down: echo "down"
linkDown: echo 'link down'
mac: null # 自定义mac地址,否则bridge随机,注意dhcp会以原始mac请求dhcp,因此不建议dhcp模式使用
dhcpv6Client: false # 是否进行 dhcpv6 请求
dhcpv6Receive: true # DHCPv6得到的地址的落脚点,只能有1个LAN获得
mtu: 1500
dhcp: # 是否开启dhcp,不是的话直接没有这一栏
start: 10.0.0.100
end: 10.0.0.240
time: 48h
domain: lan # 该段的缺省域名,默认为 br 的名称,删掉即可
pxe: # 为该段指定特别的PXE服务器,不指定的话删掉这个
file: somefile.txt
address: 10.0.0.4
- name: brwan
links:
- bond0.2
type: dhcp
address: null
moreAddresses: null
masq: true
gateways: # 网关定义,DHCP关闭自动获取网关,需要手写地址。
- id: 0 # 网关ID,关乎mark和table。该网关的table计算方法为 1100+id
address: 10.198.21.1 # 网关地址,填写 _use_first 使用可用地址第一个,填写 _use_last 使用可用地址最后一个
mac: null # 网关mac地址,为null则自动ping获取,但是bridge有启动坑容易获取失败
noOrigin: false # 是否关闭源进源出,对于专门peer的网关,这个可能很有用。
up: null
down: null
mac: null
dhcpv6Client: false
dhcpv6Receive: false
dhcp: null
ppps: # 没有可以删
- id: 0 # ppp id,例如0代表ppp0,该网关的table计算方法为 1000+id
link: bond0.41 # 上行链路
username: user # 拨号用户名,密码在pppoeUsers给出
mac: null # 给ISP看的mac地址,null为随机
dhcpv6Client: false # 使用这里的DHCPv6,所有ppp只能有1个
pppoeUsers: # PPPoE帐号,没有可以删
- username: user
password: pass
services: # 必须有
address: 10.0.0.1 # 各内网服务主要监听的地址,必须填写
ddns: # 没有可以删
- name: test-ddns
email: name@example.com # cf邮箱
apiKey: qweqwe # api密钥
zone: mycard.moe # ddns主域名
subdomain: test # ddns子域名
ipv6: false # 是否解析ipv6
interface: brwan # 网卡名,可以是null,null则用公网解析结果
vars: # 这里的都是默认设置,没什么事情可以不改,改的话需要整段抄上去
ansible_ssh_user: root
ansible_python_interpreter: python3
localnets:
- 10.0.0.0/24 # 系统内的所有内网网段
links:
- name: eno1 # 物理网卡
bonds:
- name: bond0 # bond,一般用mode 4来LACP
links:
- eno1
mode: 4
vlans:
- link: bond0 # vlan,只需要写link和tag,最后网卡名字会变成 link.tag
tag: 2
- link: bond0
tag: 3
- link: bond0
tag: 41
- link: bond0
tag: 46
bridges: # bridge,IP只能在这里配
- name: brlan # 名称
links:
- bond0 # 上行链路
type: static # dhcp还是static,manual理论上也可以
address: 10.0.0.1/24 # 首选地址
moreAddresses:
- 10.0.0.2/24 # 备选地址
gateways: null # 网关,看下面
masq: false # 是否MASQ
stp: false # 是否开启STP,默认false
linkUp: echo 'link up' # 链路启动脚本,用于奇怪的特殊链路或者netns
up: echo "up" # 启动脚本和关闭脚本
down: echo "down"
linkDown: echo 'link down'
mac: null # 自定义mac地址,否则bridge随机,注意dhcp会以原始mac请求dhcp,因此不建议dhcp模式使用
dhcpv6Client: false # 是否进行 dhcpv6 请求
dhcpv6Receive: true # DHCPv6得到的地址的落脚点,只能有1个LAN获得
mtu: 1500
dhcp: # 是否开启dhcp,不是的话直接没有这一栏
start: 10.0.0.100
end: 10.0.0.240
time: 48h
domain: lan # 该段的缺省域名,默认为 br 的名称
pxe: # 为该段指定特别的PXE服务器
file: somefile.txt
address: 10.0.0.4
- name: brwan
links:
- bond0.2
type: dhcp
address: null
moreAddresses: null
masq: true
gateways: # 网关定义,DHCP关闭自动获取网关,需要手写地址。
- id: 0 # 网关ID,关乎mark和table。该网关的table计算方法为 1100+id
address: 10.198.21.1 # 网关地址,填写 _use_first 使用可用地址第一个,填写 _use_last 使用可用地址最后一个
mac: null # 网关mac地址,为null则自动ping获取,但是bridge有启动坑容易获取失败
noOrigin: false # 是否关闭源进源出,对于专门peer的网关,这个可能很有用。
up: null
down: null
mac: null
dhcpv6Client: false
dhcpv6Receive: false
dhcp: null
ppps:
- id: 0 # ppp id,例如0代表ppp0,该网关的table计算方法为 1000+id
link: bond0.41 # 上行链路
username: user # 拨号用户名,密码在pppoeUsers给出
mac: null # 给ISP看的mac地址,null为随机
dhcpv6Client: false # 使用这里的DHCPv6,所有ppp只能有1个
pppoeUsers: # PPPoE帐号
- username: user
password: pass
smartdns:
- '10.198.0.0/16' # 主网段
- '192.168.5.0/24' # gzzchh
- '192.168.123.0/24' # ayane 公司
smartdns:
disable_ipv6: false # 是否禁用IPv6解析
tls_dns:
- 8.8.8.8
......@@ -137,22 +152,12 @@ router_nextgen:
- 223.5.5.5
dnsmasq:
gfwlistIPSet: false # 导入 gfwlist ipset
mycardDomains: false # 导入 MCNetwork 内网域名
mycardDomains: true # 导入 MCNetwork 内网域名
extraInterfaces: [] # 额外监听的网卡
kms: localhost # kms 服务器的地址,localhost 为自己搭建
aptCacher: 10.0.0.2 # apt-cacher-ng 的地址
pxe: 10.0.0.3 # pxe 服务器的地址,localhost 为自己搭建,也可以是 address/file 对象的格式
aptCacher: null # apt-cacher-ng 的地址
pxe: localhost # pxe 服务器的地址,localhost 为自己搭建,也可以是 address/file 对象的格式
ntp: localhost # ntp 服务器的地址,localhost 为自己搭建
gdut: # 校园网特化使用
remote: 10.0.3.6
flag: 2f
services:
address: 10.0.0.1 # 各内网服务主要监听的地址
ddns:
- name: test-ddns
email: name@example.com # cf邮箱
apiKey: qweqwe # api密钥
zone: mycard.moe # ddns主域名
subdomain: test # ddns子域名
ipv6: false # 是否解析ipv6
interface: brwan # 网卡名,可以是null,null则用公网解析结果
#gdut: # 校园网特化使用
# remote: 10.0.3.6
# flag: 2f
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