mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 03:32:12 +00:00
debian-9 clear out interfaces when static ip
This commit is contained in:
parent
506ce3ffd3
commit
0c578c6a7d
2 changed files with 8 additions and 1 deletions
|
@ -49,6 +49,13 @@
|
|||
src=network/debian-auto
|
||||
when: iiab_wan_iface != "none" and is_debian_9
|
||||
|
||||
- name: Clearing out /etc/network/interfaces for static addresses (is_debian_9)
|
||||
lineinfile:
|
||||
state: absent
|
||||
path: /etc/network/interfaces
|
||||
regexp: "{{ iiab_wan_iface }}"
|
||||
when: wan_ip != "dhcp" and iiab_wan_iface != "none" and is_debian_9
|
||||
|
||||
- name: bind may be affected
|
||||
service: name={{ dns_service }} state=stopped
|
||||
when: named_install and dnsmasq_enabled
|
||||
|
|
|
@ -34,7 +34,7 @@ iface {{ iiab_wan_iface }} inet dhcp
|
|||
{% endif %}
|
||||
# end dhcp clients
|
||||
# static wan
|
||||
{% if wan_ip != "dhcp" and dhcpcd_result != "enabled" and wan_in_interfaces == "false" %}
|
||||
{% if wan_ip != "dhcp" and dhcpcd_result != "enabled" %}
|
||||
auto {{ iiab_wan_iface }}
|
||||
iface {{ iiab_wan_iface }} inet static
|
||||
address {{ wan_ip }}
|
||||
|
|
Loading…
Reference in a new issue