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

#1320 fix for U-18 dnsmasq

This commit is contained in:
Jerry Vonau 2018-12-13 10:10:36 -06:00
parent 967102bc4f
commit 3167f8133a
3 changed files with 37 additions and 23 deletions

View file

@ -3,21 +3,7 @@
shell: ls /etc/netplan | grep -v -e 01-iiab-config
register: netplan
# Think 50-cloud-init.yaml is created on the fly by cloud-init on every boot
# need to double check the timestamps of the file on a rebooted machine
# disable cloud-init if that holds true
#- name: Disable and mask cloud-init
# systemd:
# name: "{{ item }}"
# enabled: no
# masked: yes
# state: stopped
# with_items:
# - cloud-init-local
# - cloud-init
# when: "{{ netplan }}" == "50-cloud-init.yaml"
- name: Disable cloud-init
- name: Disable cloud-init the easy way
shell: touch /etc/cloud/cloud-init.disabled
when: "{{ netplan }}" == "50-cloud-init.yaml"
@ -27,13 +13,27 @@
dest: /etc/netplan/{{ netplan }}
when: netplan != ""
# Was needed at one point retesting current needs
#- name: Disable and mask systemd-networkd-wait-online
# systemd:
# name: systemd-networkd-wait-online
# enabled: no
# masked: yes
# state: stopped
### NM might need attention also
- name: Disable the stock dnsmasq unit file that starts too early with systemd_networkd_active
systemd:
name: dnsmasq
enabled: no
when: systemd_networkd_active
- name: Install dnsmasq helper unit file when systemd_networkd_active
template:
src: network/dnsmasq.service.u18
dest: /etc/systemd/system/iiab-dnsmasq.service
when: systemd_networkd_active
- name: Ensure required dnsmasq unit files are enabled for reboot systemd_networkd_active
systemd:
name: "{{ item }}"
enabled: yes
with_items:
- iiab-dnsmasq
- systemd-networkd-wait-online
when: systemd_networkd_active
# ICO will always set gui_static_wan_ip away from the default of 'unset' while
# gui_static_wan turns dhcp on/off through wan_ip in computed_network and

View file

@ -1,6 +1,7 @@
[Unit]
Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
After=network-online.target
Requires=network.target
Before=network-online.target
[Service]
Type=idle

View file

@ -0,0 +1,13 @@
Unit]
Description=Network iiab-dnsmasq
Wants=network.target
After=network-online.target
Requires=network-online.target
Requires=systemd-networkd-wait-online
[Service]
Type=oneshot
ExecStart=/bin/systemctl start dnsmasq
[Install]
WantedBy=multi-user.target