Commit c5f45a74 authored by nanahira's avatar nanahira

support custom dhclient

parent 90a24748
...@@ -125,6 +125,14 @@ ...@@ -125,6 +125,14 @@
bootp-broadcast-always; bootp-broadcast-always;
timeout 300; timeout 300;
{% for br in bridges %}
{% if br.dhclient is defined and br.dhclient %}
interface "{{br.name}}" {
{{br.dhclient}}
}
{% endif %}
{% endfor %}
dest: /etc/dhcp/dhclient.conf dest: /etc/dhcp/dhclient.conf
- name: remove dhclient resolved hook - name: remove dhclient resolved hook
become: true become: true
......
...@@ -52,6 +52,7 @@ vars: ...@@ -52,6 +52,7 @@ vars:
address: null address: null
moreAddresses: null moreAddresses: null
masq: true masq: true
dhclient: null # 自定义 dhclient 配置
gateways: # 网关定义,DHCP关闭自动获取网关,需要手写地址。 gateways: # 网关定义,DHCP关闭自动获取网关,需要手写地址。
- id: 0 # 网关ID,关乎mark和table。该网关的table计算方法为 1100+id - id: 0 # 网关ID,关乎mark和table。该网关的table计算方法为 1100+id
address: 10.198.21.1 # 网关地址,填写 _use_first 使用可用地址第一个,填写 _use_last 使用可用地址最后一个 address: 10.198.21.1 # 网关地址,填写 _use_first 使用可用地址第一个,填写 _use_last 使用可用地址最后一个
......
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