1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Ubuntu - use networkd-dispatcher hooks to restart hostapd when br0 appears

This commit is contained in:
Jerry Vonau 2020-08-01 11:06:45 -05:00
parent 13e25494c0
commit e57cad010e

View file

@ -85,23 +85,22 @@
#- debug: #- debug:
# var: nd_enabled # var: nd_enabled
#- name: Check if /etc/networkd-dispatcher/routable.d exists - name: Check if /etc/networkd-dispatcher/routable.d exists
# stat: stat:
# path: /etc/networkd-dispatcher/routable.d path: /etc/networkd-dispatcher/routable.d
# register: nd_dir register: nd_dir
#- debug: #- debug:
# var: nd_dir # var: nd_dir
#- name: To restart dnsmasq whenever br0 comes up, install /etc/networkd-dispatcher/routable.d/dnsmasq.sh from template (if isn't Appliance, and networkd-dispatcher is enabled, and directory /etc/networkd-dispatcher/routable.d exists, i.e. OS's like Ubuntu 18.04) - name: To restart dnsmasq whenever br0 comes up, install /etc/networkd-dispatcher/routable.d/dnsmasq.sh from template (if isn't Appliance, and directory /etc/networkd-dispatcher/routable.d exists, i.e. OS's like Ubuntu 18.04 or later)
#- name: To restart dnsmasq whenever br0 comes up, install /etc/networkd-dispatcher/routable.d/dnsmasq.sh from template (if isn't Appliance, and directory /etc/networkd-dispatcher/routable.d exists, i.e. OS's like Ubuntu 18.04) template:
# template: src: roles/network/templates/network/dnsmasq.sh.j2
# src: roles/network/templates/network/dnsmasq.sh.j2 dest: /etc/networkd-dispatcher/routable.d/dnsmasq.sh
# dest: /etc/networkd-dispatcher/routable.d/dnsmasq.sh mode: 0755
# mode: 0755 owner: root
# owner: root group: root
# group: root when: dnsmasq_install and dnsmasq_enabled and nd_dir.stat.exists and nd_dir.stat.isdir and (iiab_network_mode != "Appliance")
# when: dnsmasq_install and dnsmasq_enabled and nd_dir.stat.exists and nd_dir.stat.isdir and (iiab_network_mode != "Appliance")
#when: dnsmasq_install and dnsmasq_enabled and nd_enabled is defined and nd_enabled.stdout == "enabled" and nd_dir.stat.exists and nd_dir.stat.isdir and (iiab_network_mode != "Appliance") #when: dnsmasq_install and dnsmasq_enabled and nd_enabled is defined and nd_enabled.stdout == "enabled" and nd_dir.stat.exists and nd_dir.stat.isdir and (iiab_network_mode != "Appliance")
#when: dnsmasq_install and dnsmasq_enabled and systemd_out.status.UnitFileState == "enabled" and networkd_dir.stat.exists and networkd_dir.stat.isdir and (iiab_network_mode != "Appliance") #when: dnsmasq_install and dnsmasq_enabled and systemd_out.status.UnitFileState == "enabled" and networkd_dir.stat.exists and networkd_dir.stat.isdir and (iiab_network_mode != "Appliance")