mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Update debian.yml
This commit is contained in:
parent
74dca68882
commit
0247ee1930
1 changed files with 40 additions and 24 deletions
|
@ -21,52 +21,64 @@
|
||||||
# state=present
|
# state=present
|
||||||
|
|
||||||
- name: For upgrades from earlier IIAB 6.2, remove br0 file
|
- name: For upgrades from earlier IIAB 6.2, remove br0 file
|
||||||
file: path=/etc/network/interfaces.d/br0
|
file:
|
||||||
state=absent
|
path: /etc/network/interfaces.d/br0
|
||||||
|
state: absent
|
||||||
when: iiab_lan_iface != "br0" and wan_ip == "dhcp"
|
when: iiab_lan_iface != "br0" and wan_ip == "dhcp"
|
||||||
|
|
||||||
- name: Supply resolvconf.conf
|
- name: Supply resolvconf.conf
|
||||||
template: dest=/etc/resolvconf.conf
|
template:
|
||||||
src=network/resolvconf.j2
|
dest: /etc/resolvconf.conf
|
||||||
|
src: network/resolvconf.j2
|
||||||
|
|
||||||
- name: Supply dhcpcd.conf
|
- name: Supply dhcpcd.conf
|
||||||
template: dest=/etc/dhcpcd.conf
|
template:
|
||||||
src=network/dhcpcd.conf.j2
|
dest: /etc/dhcpcd.conf
|
||||||
|
src: network/dhcpcd.conf.j2
|
||||||
when: dhcpcd_result == "enabled"
|
when: dhcpcd_result == "enabled"
|
||||||
|
|
||||||
- name: Copy the bridge script
|
- name: Copy the bridge script
|
||||||
template: dest=/etc/network/interfaces.d/iiab
|
template:
|
||||||
src=network/systemd.j2
|
dest: /etc/network/interfaces.d/iiab
|
||||||
|
src: network/systemd.j2
|
||||||
when: not is_rpi and (iiab_lan_iface == "br0" or wan_ip != "dhcp" or gui_static_wan_ip == "undefined")
|
when: not is_rpi and (iiab_lan_iface == "br0" or wan_ip != "dhcp" or gui_static_wan_ip == "undefined")
|
||||||
|
|
||||||
- name: Copy the bridge script for RPi
|
- name: Copy the bridge script for RPi
|
||||||
template: dest=/etc/network/interfaces.d/iiab
|
template:
|
||||||
src=network/rpi.j2
|
dest: /etc/network/interfaces.d/iiab
|
||||||
|
src: network/rpi.j2
|
||||||
when: is_rpi and iiab_lan_iface == "br0"
|
when: is_rpi and iiab_lan_iface == "br0"
|
||||||
|
|
||||||
- name: Workaround auto issue on Debian-9
|
- name: Workaround auto issue (debian-9)
|
||||||
template: dest=/etc/network/interfaces.d/patch_auto
|
template:
|
||||||
src=network/debian-auto.j2
|
dest: /etc/network/interfaces.d/patch_auto
|
||||||
|
src: network/debian-auto.j2
|
||||||
when: iiab_wan_iface != "none" and is_debian_9
|
when: iiab_wan_iface != "none" and is_debian_9
|
||||||
|
|
||||||
- name: Clearing out /etc/network/interfaces for static addresses (is_debian_9)
|
- name: Clearing out /etc/network/interfaces for static addresses (debian-9)
|
||||||
lineinfile:
|
lineinfile:
|
||||||
state: absent
|
state: absent
|
||||||
path: /etc/network/interfaces
|
path: /etc/network/interfaces
|
||||||
regexp: "{{ iiab_wan_iface }}"
|
regexp: "{{ iiab_wan_iface }}"
|
||||||
when: wan_ip != "dhcp" and iiab_wan_iface != "none" and is_debian_9
|
when: wan_ip != "dhcp" and iiab_wan_iface != "none" and is_debian_9
|
||||||
|
|
||||||
- name: bind may be affected
|
- name: BIND may be affected
|
||||||
service: name={{ dns_service }} state=stopped
|
service:
|
||||||
|
name: "{{ dns_service }}"
|
||||||
|
state: stopped
|
||||||
when: named_install and dnsmasq_enabled
|
when: named_install and dnsmasq_enabled
|
||||||
|
|
||||||
# dhcpd_server release the interface
|
# dhcpd_server release the interface
|
||||||
- name: dhcpd_server may be affected - stopping dhcpd
|
- name: dhcpd_server may be affected - stopping dhcpd
|
||||||
service: name=dhcpd state=stopped
|
service:
|
||||||
|
name: dhcpd
|
||||||
|
state: stopped
|
||||||
when: dhcpd_install
|
when: dhcpd_install
|
||||||
|
|
||||||
- name: dhcpd_server may be affected - stopping dnsmasq
|
- name: dnsmasq may be affected - stopping dnsmasq
|
||||||
service: name=dnsmasq state=stopped
|
service:
|
||||||
|
name: dnsmasq
|
||||||
|
state: stopped
|
||||||
when: dnsmasq_install
|
when: dnsmasq_install
|
||||||
|
|
||||||
- name: Reload systemd
|
- name: Reload systemd
|
||||||
|
@ -75,9 +87,13 @@
|
||||||
|
|
||||||
# now pick up denyinterfaces
|
# now pick up denyinterfaces
|
||||||
- name: Restart dhcpcd
|
- name: Restart dhcpcd
|
||||||
service: name=dhcpcd state=restarted
|
service:
|
||||||
|
name: dhcpcd
|
||||||
|
state: restarted
|
||||||
when: dhcpcd_result == "enabled"
|
when: dhcpcd_result == "enabled"
|
||||||
|
|
||||||
- name: Restart the networking service
|
- name: Restart the networking service
|
||||||
service: name=networking state=restarted
|
service:
|
||||||
|
name: networking
|
||||||
|
state: restarted
|
||||||
when: not nobridge is defined and not no_net_restart
|
when: not nobridge is defined and not no_net_restart
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue