mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge branch 'master' into cwivagg/matomo_20220618
This commit is contained in:
commit
dea1907a00
71 changed files with 209 additions and 218 deletions
|
|
@ -64,15 +64,12 @@
|
|||
# 2020-11-04: Fix validation of 5 [now 4] core dependencies, for ./runrole etc
|
||||
|
||||
|
||||
- name: Set vars_checklist for 46 + 46 + 42 vars ("XYZ_install" + "XYZ_enabled" + "XYZ_installed") to be checked
|
||||
- name: Set vars_checklist for 44 + 44 + 0 vars ("XYZ_install" + "XYZ_enabled" + "XYZ_installed") to be checked
|
||||
set_fact:
|
||||
vars_checklist:
|
||||
- hostapd
|
||||
- dhcpd
|
||||
- named
|
||||
- dnsmasq
|
||||
- bluetooth
|
||||
#- wondershaper # Unmaintained
|
||||
- sshd
|
||||
- openvpn
|
||||
- remoteit
|
||||
|
|
@ -81,18 +78,10 @@
|
|||
#- apache # Unmaintained - former dependency
|
||||
#- mysql # MANDATORY
|
||||
- squid
|
||||
#- dansguardian # Unmaintained
|
||||
- cups
|
||||
- samba
|
||||
- usb_lib
|
||||
#- xo_services # Unmaintained
|
||||
#- activity_server # Unmaintained
|
||||
#- ejabberd_xs # Unmaintained
|
||||
#- idmgr # Unmaintained
|
||||
- azuracast
|
||||
#- dokuwiki # Unmaintained
|
||||
#- ejabberd # Unmaintained
|
||||
#- elgg # Unmaintained
|
||||
- gitea
|
||||
- jupyterhub
|
||||
- lokole
|
||||
|
|
@ -168,3 +157,21 @@
|
|||
quiet: yes
|
||||
when: item != 'nodejs' and item != 'postgresql' and item != 'mongodb' and item != 'yarn' # Exclude auto-installed dependencies
|
||||
loop: "{{ vars_checklist }}"
|
||||
|
||||
- name: 'DISALLOW "XYZ_install: True" if deprecated'
|
||||
assert:
|
||||
that: "{{ item }}_install is undefined or not {{ item }}_install"
|
||||
fail_msg: "DISALLOWED: '{{ item }}_install: True' (e.g. in /etc/iiab/local_vars.yml)"
|
||||
quiet: yes
|
||||
with_items:
|
||||
- dhcpd # Deprecated
|
||||
- named # Deprecated
|
||||
- wondershaper # Deprecated
|
||||
- dansguardian # Deprecated
|
||||
#- xo_services # Unmaintained
|
||||
#- activity_server # Unmaintained
|
||||
#- ejabberd_xs # Unmaintained
|
||||
#- idmgr # Unmaintained
|
||||
#- dokuwiki # Unmaintained
|
||||
#- ejabberd # Unmaintained
|
||||
#- elgg # Unmaintained
|
||||
|
|
|
|||
|
|
@ -23,12 +23,18 @@
|
|||
name: iiab-admin
|
||||
#when: iiab_admin_install # Flag might be created in future?
|
||||
|
||||
- name: Copy iiab-apps-to-be-installed from {{ iiab_dir }} to /usr/bin/
|
||||
- name: Copy iiab-apps-to-be-installed from {{ iiab_dir }}/scripts to /usr/bin/
|
||||
copy:
|
||||
src: "{{ iiab_dir }}/scripts/iiab-apps-to-be-installed" # /opt/iiab/iiab
|
||||
dest: /usr/bin/
|
||||
mode: '0755'
|
||||
|
||||
- name: Copy iiab-network from {{ iiab_dir }}/scripts to /usr/local/bin/
|
||||
copy:
|
||||
src: "{{ iiab_dir }}/scripts/iiab-network"
|
||||
dest: /usr/local/bin/
|
||||
mode: '0755'
|
||||
|
||||
- name: Install ~12 network/wifi/related packages + Squid if necessary + configure /etc/sysctl.conf -- full configuration LATER in 'network', after Stage 9
|
||||
include_tasks: roles/network/tasks/install.yml
|
||||
when: network_install and network_installed is undefined
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
- name: Install firmware (for RPi internal WiFi)
|
||||
include_tasks: install.yml
|
||||
#when: firmware_installed is undefined
|
||||
when: firmware_installed is undefined
|
||||
|
||||
# Two variables are placed in /etc/iiab/iiab_state.yml:
|
||||
#
|
||||
|
|
|
|||
|
|
@ -44,10 +44,11 @@ else
|
|||
echo -e "settings in /etc/iiab/local_vars.yml, please then run:"
|
||||
echo
|
||||
echo -e " cd /opt/iiab/iiab"
|
||||
echo -e " sudo iiab-hotspot-off # Sometimes nec, eg to restore 'wifi_up_down: True'"
|
||||
echo -e " sudo ./iiab-network # Or, 'sudo ./runrole firmware' is SOMETIMES enough"
|
||||
echo -e " sudo iiab-hotspot-on # Sometimes nec, eg to restore 'wifi_up_down: True'"
|
||||
echo -e " sudo poweroff\n"
|
||||
echo -e " sudo iiab-hotspot-off # NO LONGER NEC? eg to restore 'wifi_up_down: True'"
|
||||
echo -e " sudo ./runrole --reinstall firmware"
|
||||
echo -e " sudo ./iiab-network # SOMETIMES NECESSARY"
|
||||
echo -e " sudo iiab-hotspot-on # NO LONGER NEC? eg to restore 'wifi_up_down: True'"
|
||||
echo -e " sudo reboot\n"
|
||||
#echo
|
||||
#echo -e "Disconnect your power cord before rebooting, for better WiFi firmware results.\n"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
if [ -f /tmp/.fw_modified ]; then
|
||||
echo -e "\n\e[41;1mWiFi Firmware link(s) modified, per iiab/iiab#2853: PLEASE REBOOT!\e[0m"
|
||||
echo
|
||||
echo -e "If you want this warning to stop, run: sudo rm /tmp/.fw_modified\n"
|
||||
echo -e "If you want this warning to stop, reboot to remove /tmp/.fw_modified\n"
|
||||
fi
|
||||
|
||||
# \e[1m = bright white \e[100;1m = bright white, on gray \n\e[41;1m = bright white, on red
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
- name: Download kiwix.apk to {{ doc_root }}{{ kiwix_apk_url }}
|
||||
get_url:
|
||||
url: "{{ kiwix_apk_src }}" # e.g. https://download.kiwix.org/release/kiwix-android/kiwix.apk
|
||||
url: "{{ kiwix_apk_src }}" # e.g. https://download.kiwix.org/release/kiwix-android/kiwix.apk formerly kiwix-3.5.0.apk
|
||||
dest: "{{ doc_root }}{{ kiwix_apk_url }}"
|
||||
timeout: "{{ download_timeout }}"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# NM-debian.yml
|
||||
- name: Stopping services
|
||||
include_tasks: down-debian.yml
|
||||
#- name: Stopping services
|
||||
# include_tasks: down-debian.yml
|
||||
|
||||
# provide keyfile layout like the XO's used way back.
|
||||
#- name: Create uuid for NM's keyfile store
|
||||
|
|
|
|||
|
|
@ -20,35 +20,35 @@
|
|||
iiab_network_mode: "Gateway"
|
||||
when: iiab_lan_iface != "none" and iiab_wan_iface != "none"
|
||||
|
||||
- name: No LAN configured - non-dnsmasq
|
||||
set_fact:
|
||||
named_enabled: True
|
||||
dhcpd_enabled: False
|
||||
dhcp_service2: "dhcpd disabled"
|
||||
when: not dnsmasq_enabled and iiab_network_mode == "Appliance"
|
||||
#- name: No LAN configured - non-dnsmasq
|
||||
# set_fact:
|
||||
# named_enabled: True
|
||||
# dhcpd_enabled: False
|
||||
# dhcp_service2: "dhcpd disabled"
|
||||
# when: not dnsmasq_enabled and iiab_network_mode == "Appliance"
|
||||
|
||||
- name: LAN configured - non-dnsmasq
|
||||
set_fact:
|
||||
named_enabled: True
|
||||
dhcpd_enabled: True
|
||||
dhcp_service2: "dhcpd"
|
||||
when: not dnsmasq_enabled and iiab_network_mode != "Appliance"
|
||||
#- name: LAN configured - non-dnsmasq
|
||||
# set_fact:
|
||||
# named_enabled: True
|
||||
# dhcpd_enabled: True
|
||||
# dhcp_service2: "dhcpd"
|
||||
# when: not dnsmasq_enabled and iiab_network_mode != "Appliance"
|
||||
|
||||
- name: LAN configured - dnsmasq
|
||||
set_fact:
|
||||
named_enabled: False
|
||||
dhcpd_enabled: False
|
||||
dnsmasq_enabled: True
|
||||
dhcp_service2: "dnsmasq"
|
||||
when: dnsmasq_install and iiab_network_mode != "Appliance"
|
||||
#- name: LAN configured - dnsmasq
|
||||
# set_fact:
|
||||
# named_enabled: False
|
||||
# dhcpd_enabled: False
|
||||
# dnsmasq_enabled: True
|
||||
# dhcp_service2: "dnsmasq"
|
||||
# when: dnsmasq_install and iiab_network_mode != "Appliance"
|
||||
|
||||
- name: LAN not configured - dnsmasq
|
||||
set_fact:
|
||||
named_enabled: False
|
||||
dhcpd_enabled: False
|
||||
dnsmasq_enabled: True
|
||||
dhcp_service2: "dnsmasq"
|
||||
when: dnsmasq_install and iiab_network_mode == "Appliance"
|
||||
#- name: LAN not configured - dnsmasq
|
||||
# set_fact:
|
||||
# named_enabled: False
|
||||
# dhcpd_enabled: False
|
||||
# dnsmasq_enabled: True
|
||||
# dhcp_service2: "dnsmasq"
|
||||
# when: dnsmasq_install and iiab_network_mode == "Appliance"
|
||||
|
||||
- name: Add 'network' variable values (from computed_services.yml) to {{ iiab_ini_file }}
|
||||
ini_file:
|
||||
|
|
@ -71,12 +71,12 @@
|
|||
# value: "{{ wondershaper_enabled }}"
|
||||
- option: iiab_network_mode_applied
|
||||
value: "{{ iiab_network_mode }}"
|
||||
- option: dhcpd_enabled
|
||||
value: "{{ dhcpd_enabled }}"
|
||||
- option: dhcp_service2
|
||||
value: "{{ dhcp_service2 }}"
|
||||
- option: named_enabled
|
||||
value: "{{ named_enabled }}"
|
||||
# - option: dhcpd_enabled
|
||||
# value: "{{ dhcpd_enabled }}"
|
||||
# - option: dhcp_service2
|
||||
# value: "{{ dhcp_service2 }}"
|
||||
# - option: named_enabled
|
||||
# value: "{{ named_enabled }}"
|
||||
- option: dnsmasq_enabled
|
||||
value: "{{ dnsmasq_enabled }}"
|
||||
- option: no_net_restart
|
||||
|
|
@ -89,7 +89,7 @@
|
|||
value: "{{ host_wifi_mode }}"
|
||||
- option: host_channel
|
||||
value: "{{ host_channel }}"
|
||||
|
||||
|
||||
- name: Add 'network' variable 'current_client_channel' value if defined, to {{ iiab_ini_file }}
|
||||
ini_file:
|
||||
dest: "{{ iiab_ini_file }}"
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
regexp: "{{ iiab_wan_iface }}"
|
||||
when: wan_ip != "dhcp" and iiab_wan_iface != "none" and is_debian and not is_debian_8
|
||||
|
||||
- include_tasks: down-debian.yml
|
||||
#- include_tasks: down-debian.yml
|
||||
|
||||
- name: Reload systemd
|
||||
systemd:
|
||||
|
|
|
|||
|
|
@ -1,70 +1,72 @@
|
|||
- name: Disable dhcpd service
|
||||
service:
|
||||
name: dhcpd
|
||||
enabled: no
|
||||
when: (dhcpd_install or dhcpd_installed is defined) and not dhcpd_enabled
|
||||
#- name: Disable dhcpd service
|
||||
# service:
|
||||
# name: dhcpd
|
||||
# enabled: no
|
||||
# when: (dhcpd_install or dhcpd_installed is defined) and not dhcpd_enabled
|
||||
|
||||
# service is restarted with NM dispatcher.d script
|
||||
- name: Enable dhcpd service
|
||||
service:
|
||||
name: dhcpd
|
||||
enabled: yes
|
||||
when: dhcpd_install and dhcpd_enabled
|
||||
#- name: Enable dhcpd service
|
||||
# service:
|
||||
# name: dhcpd
|
||||
# enabled: yes
|
||||
# when: dhcpd_install and dhcpd_enabled
|
||||
|
||||
- name: Install /etc/sysconfig/dhcpd, /etc/dhcpd-iiab.conf from templates (root:root, 0644 by default)
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
#- name: Install /etc/sysconfig/dhcpd, /etc/dhcpd-iiab.conf from templates (root:root, 0644 by default)
|
||||
# template:
|
||||
# src: "{{ item.src }}"
|
||||
# dest: "{{ item.dest }}"
|
||||
# # owner: root
|
||||
# group: root
|
||||
# mode: "{{ item.mode }}"
|
||||
# with_items:
|
||||
# - { src: 'dhcp/dhcpd-env.j2', dest: '/etc/sysconfig/dhcpd' }
|
||||
# - { src: 'dhcp/dhcpd-iiab.conf.j2', dest: '/etc/dhcpd-iiab.conf' }
|
||||
# when: dhcpd_install and dhcpd_enabled
|
||||
|
||||
#- name: Install /etc/named-iiab.conf and two *.zone.db files into /var/named-iiab (root:root, 0644 by default)
|
||||
# template:
|
||||
# src: "{{ item.src }}"
|
||||
# dest: "{{ item.dest }}"
|
||||
# owner: root
|
||||
# group: root
|
||||
# mode: "{{ item.mode }}"
|
||||
with_items:
|
||||
- { src: 'dhcp/dhcpd-env.j2', dest: '/etc/sysconfig/dhcpd' }
|
||||
- { src: 'dhcp/dhcpd-iiab.conf.j2', dest: '/etc/dhcpd-iiab.conf' }
|
||||
when: dhcpd_install and dhcpd_enabled
|
||||
# with_items:
|
||||
# - { src: 'named/named-iiab.conf.j2', dest: '/etc/named-iiab.conf' }
|
||||
# - { src: 'named/school.local.zone.db.j2', dest: '/var/named-iiab/school.local.zone.db' }
|
||||
# - { src: 'named/school.internal.zone.db.j2', dest: '/var/named-iiab/school.internal.zone.db' }
|
||||
# when: named_install and named_enabled
|
||||
|
||||
- name: Install /etc/named-iiab.conf and two *.zone.db files into /var/named-iiab (root:root, 0644 by default)
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
# owner: root
|
||||
# group: root
|
||||
# mode: "{{ item.mode }}"
|
||||
with_items:
|
||||
- { src: 'named/named-iiab.conf.j2', dest: '/etc/named-iiab.conf' }
|
||||
- { src: 'named/school.local.zone.db.j2', dest: '/var/named-iiab/school.local.zone.db' }
|
||||
- { src: 'named/school.internal.zone.db.j2', dest: '/var/named-iiab/school.internal.zone.db' }
|
||||
when: named_install and named_enabled
|
||||
#- name: Enable named service ({{ dns_service }}) if named_enabled
|
||||
# systemd:
|
||||
# name: "{{ dns_service }}"
|
||||
# enabled: yes
|
||||
# when: named_install and named_enabled
|
||||
|
||||
- name: Enable named service ({{ dns_service }}) if named_enabled
|
||||
systemd:
|
||||
name: "{{ dns_service }}"
|
||||
enabled: yes
|
||||
when: named_install and named_enabled
|
||||
|
||||
- name: Disable named service ({{ dns_service }}) if not named_enabled
|
||||
systemd:
|
||||
name: "{{ dns_service }}"
|
||||
enabled: no
|
||||
when: (named_install or named_installed is defined) and not named_enabled
|
||||
#- name: Disable named service ({{ dns_service }}) if not named_enabled
|
||||
# systemd:
|
||||
# name: "{{ dns_service }}"
|
||||
# enabled: no
|
||||
# when: (named_install or named_installed is defined) and not named_enabled
|
||||
|
||||
- name: Install /etc/dnsmasq.d/iiab.conf from template, when dnsmasq_enabled and isn't Appliance
|
||||
template:
|
||||
src: network/dnsmasq.conf.j2
|
||||
dest: /etc/dnsmasq.d/iiab.conf
|
||||
when: dnsmasq_install and dnsmasq_enabled and (iiab_network_mode != "Appliance")
|
||||
when: iiab_network_mode != "Appliance"
|
||||
# when: dnsmasq_install and dnsmasq_enabled and (iiab_network_mode != "Appliance")
|
||||
|
||||
- name: Install /etc/hosts.dnsmasq from template for /etc/dnsmasq.d/iiab.conf (instead of using /etc/hosts)
|
||||
template:
|
||||
src: network/hosts-dnsmasq.j2
|
||||
dest: /etc/hosts.dnsmasq
|
||||
when: dnsmasq_install and dnsmasq_enabled and (iiab_network_mode != "Appliance")
|
||||
when: iiab_network_mode != "Appliance"
|
||||
# when: dnsmasq_install and dnsmasq_enabled and (iiab_network_mode != "Appliance")
|
||||
|
||||
- name: Update /etc/dnsmasq.d/dnsmasq-iiab for custom dns setting
|
||||
template:
|
||||
src: network/dnsmasq-iiab
|
||||
dest: /etc/dnsmasq.d/dnsmasq-iiab
|
||||
when: dnsmasq_install # 2020-05-10: Are all these dnsmasq_install conditions really still necessary ?
|
||||
# when: dnsmasq_install # 2020-05-10: Are all these dnsmasq_install conditions really still necessary ?
|
||||
|
||||
## Another way to skin the cat
|
||||
##- name: Check if systemd service networkd-dispatcher is enabled
|
||||
|
|
@ -93,6 +95,8 @@
|
|||
#- debug:
|
||||
# var: nd_dir
|
||||
|
||||
# networkd-dispatcher not enabled for is_linuxmint https://github.com/iiab/iiab/issues/3278
|
||||
# might need the same dispatcher treatment using networkmanager-dispatcher to bring up dnsmasq or look at dnsmasq-iiab
|
||||
- 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) (root:root by default)
|
||||
template:
|
||||
src: roles/network/templates/network/dnsmasq.sh.j2
|
||||
|
|
@ -100,27 +104,28 @@
|
|||
mode: 0755
|
||||
# owner: 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: 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 systemd_out.status.UnitFileState == "enabled" and networkd_dir.stat.exists and networkd_dir.stat.isdir and (iiab_network_mode != "Appliance")
|
||||
|
||||
- name: Remove /etc/dnsmasq.d/iiab.conf, when not dnsmasq_enabled or is Appliance
|
||||
- name: Remove /etc/dnsmasq.d/iiab.conf, when is Appliance
|
||||
file:
|
||||
path: /etc/dnsmasq.d/iiab.conf
|
||||
state: absent
|
||||
when: (not dnsmasq_enabled) or (iiab_network_mode == "Appliance")
|
||||
when: iiab_network_mode == "Appliance"
|
||||
|
||||
- name: Enable iiab-dnsmasq systemd service, if dnsmasq_enabled
|
||||
systemd:
|
||||
name: iiab-dnsmasq
|
||||
enabled: yes
|
||||
when: dnsmasq_install and dnsmasq_enabled
|
||||
when: dnsmasq_enabled
|
||||
|
||||
- name: Disable iiab-dnsmasq, if not dnsmasq_enabled
|
||||
systemd:
|
||||
name: iiab-dnsmasq
|
||||
enabled: no
|
||||
when: dnsmasq_install and not dnsmasq_enabled
|
||||
when: not dnsmasq_enabled
|
||||
|
||||
# - name: Enable DansGuardian systemd service, if dansguardian_enabled
|
||||
# systemd:
|
||||
|
|
@ -139,13 +144,13 @@
|
|||
path: "{{ iiab_env_file }}"
|
||||
regexp: '^HTTPCACHE_ON=*'
|
||||
line: 'HTTPCACHE_ON=True'
|
||||
when: squid_install and squid_enabled
|
||||
when: squid_installed is defined and squid_enabled
|
||||
|
||||
- name: Enable systemd service '{{ proxy }}' - if squid_install and squid_enabled
|
||||
systemd:
|
||||
name: "{{ proxy }}" # squid (or 'squid3' on vars/debian-8.yml, vars/raspbian-8.yml)
|
||||
enabled: yes
|
||||
when: squid_install and squid_enabled
|
||||
when: squid_installed is defined and squid_enabled
|
||||
|
||||
- name: Install /etc/{{ proxy }}/squid.conf from template (root:root, 0644 by default) - and create a timestamped backup of the original - if squid_install and squid_enabled
|
||||
template:
|
||||
|
|
@ -154,7 +159,7 @@
|
|||
# owner: "{{ proxy_user }}" # proxy (or 'squid' on vars/centos-7.yml, vars/fedora-18.yml, vars/fedora-12.yml)
|
||||
# group: "{{ proxy_user }}"
|
||||
backup: yes
|
||||
when: squid_install and squid_enabled
|
||||
when: squid_installed is defined and squid_enabled
|
||||
|
||||
# - name: Point /etc/init.d/{{ proxy }} to /etc/{{ proxy }}/squid-iiab.conf - if squid_install and squid_enabled
|
||||
# lineinfile:
|
||||
|
|
@ -167,14 +172,14 @@
|
|||
systemd:
|
||||
name: "{{ proxy }}"
|
||||
enabled: no
|
||||
when: (squid_install or squid_installed is defined) and not squid_enabled
|
||||
when: squid_installed is defined and not squid_enabled
|
||||
|
||||
- name: Revert {{ iiab_env_file }} to 'HTTPCACHE_ON=False' - if squid_install and not squid_enabled
|
||||
lineinfile:
|
||||
path: "{{ iiab_env_file }}"
|
||||
regexp: '^HTTPCACHE_ON=*'
|
||||
line: 'HTTPCACHE_ON=False'
|
||||
when: squid_install and not squid_enabled
|
||||
when: squid_installed is defined and not squid_enabled
|
||||
|
||||
# - name: Enable Wondershaper service, if wondershaper_enabled
|
||||
# systemd:
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@
|
|||
systemd:
|
||||
name: "{{ item }}"
|
||||
enabled: no
|
||||
daemon_reload: yes
|
||||
daemon_reload: yes
|
||||
with_items:
|
||||
- iiab-clone-wifi.service
|
||||
- iiab-wifi-test.service
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
package:
|
||||
name: networkd-dispatcher # 15kB download: Dispatcher service for systemd-networkd connection status changes
|
||||
state: present
|
||||
when: not is_raspbian
|
||||
when: not is_raspbian or not is_linuxmint
|
||||
|
||||
# 2021-07-27 from @jvonau: 3 apt packages BELOW (iw, rfkill, wireless-tools)
|
||||
# are provided by RasPiOS. Ubuntu|Debian on the other hand are hit or miss:
|
||||
|
|
@ -62,14 +62,14 @@
|
|||
|
||||
|
||||
# UNMAINTAINED
|
||||
- name: Install named / BIND
|
||||
include_tasks: roles/network/tasks/named.yml
|
||||
when: named_install is defined and named_install
|
||||
#- name: Install named / BIND
|
||||
# include_tasks: roles/network/tasks/named.yml
|
||||
# when: named_install is defined and named_install
|
||||
|
||||
# UNMAINTAINED
|
||||
- name: Install dhcpd
|
||||
include_tasks: roles/network/tasks/dhcpd.yml
|
||||
when: dhcpd_install is defined and dhcpd_install
|
||||
#- name: Install dhcpd
|
||||
# include_tasks: roles/network/tasks/dhcpd.yml
|
||||
# when: dhcpd_install is defined and dhcpd_install
|
||||
|
||||
# LESS MAINTAINED
|
||||
- name: Install Squid
|
||||
|
|
|
|||
|
|
@ -47,17 +47,17 @@
|
|||
# include_tasks: wondershaper.yml
|
||||
# when: wondershaper_install or wondershaper_installed is defined
|
||||
|
||||
- name: (Re)Install named
|
||||
include_tasks: named.yml
|
||||
when: named_install and FQDN_changed and iiab_stage|int == 9
|
||||
# - name: (Re)Install named
|
||||
# include_tasks: named.yml
|
||||
# when: named_install and FQDN_changed and iiab_stage|int == 9
|
||||
|
||||
- name: (Re)Install dhcpd
|
||||
include_tasks: dhcpd.yml
|
||||
when: dhcpd_install and FQDN_changed and iiab_stage|int == 9
|
||||
# - name: (Re)Install dhcpd
|
||||
# include_tasks: dhcpd.yml
|
||||
# when: dhcpd_install and FQDN_changed and iiab_stage|int == 9
|
||||
|
||||
- name: (Re)Install Squid
|
||||
include_tasks: squid.yml
|
||||
when: squid_install and FQDN_changed and iiab_stage|int == 9
|
||||
# - name: (Re)Install Squid
|
||||
# include_tasks: squid.yml
|
||||
# when: squid_install and FQDN_changed and iiab_stage|int == 9
|
||||
|
||||
#preprep for backends
|
||||
- name: Netplan in use on Ubuntu 18.04+
|
||||
|
|
|
|||
|
|
@ -29,11 +29,11 @@
|
|||
shell: netplan apply
|
||||
when: wifi_up_down and is_ubuntu and netplan.stdout.find("yaml") != -1
|
||||
|
||||
- name: Start named service
|
||||
systemd:
|
||||
name: "{{ dns_service }}"
|
||||
state: restarted
|
||||
when: named_enabled and named_install
|
||||
#- name: Start named service
|
||||
# systemd:
|
||||
# name: "{{ dns_service }}"
|
||||
# state: restarted
|
||||
# when: named_enabled and named_install
|
||||
|
||||
- name: Stop Squid service
|
||||
systemd:
|
||||
|
|
@ -98,11 +98,13 @@
|
|||
#both interfaces.d and systemd-networkd should have br0 available and Appliance lacks br0
|
||||
#keep an eye on legacy wifi installs where br0 is present but not 'online' with an ip address
|
||||
#due to hostapd didn't go to a carrier state. All others should get dnsmasq restarted
|
||||
- name: User choice of dnsmasq or dhcpd - restarting {{ dhcp_service2 }}
|
||||
#- name: User choice of dnsmasq or dhcpd - restarting {{ dhcp_service2 }}
|
||||
- name: Restarting dnsmasq
|
||||
systemd:
|
||||
name: "{{ dhcp_service2 }}"
|
||||
name: dnsmasq
|
||||
state: restarted
|
||||
when: (not no_net_restart or (is_ubuntu and wifi_up_down)) or (iiab_stage|int == 9)
|
||||
when: dnsmasq_enabled and ((not no_net_restart or (is_ubuntu and wifi_up_down)) or (iiab_stage|int == 9))
|
||||
# when: (not no_net_restart or (is_ubuntu and wifi_up_down)) or (iiab_stage|int == 9)
|
||||
#when: (not no_net_restart or (is_ubuntu_20 and wifi_up_down)) or (iiab_stage|int == 9)
|
||||
#when: (not no_net_restart or (is_ubuntu_20 and wifi_up_down))
|
||||
#when: (iiab_network_mode != "Appliance") # Sufficient b/c br0 exists thanks to /etc/network/interfaces.d/iiab
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
when: country_code is defined and country_code.stdout | length > 0
|
||||
|
||||
- name: Put country code ({{ host_country_code }}) in /etc/wpa_supplicant/wpa_supplicant.conf if nec
|
||||
lineinfile:
|
||||
lineinfile:
|
||||
path: /etc/wpa_supplicant/wpa_supplicant.conf
|
||||
regexp: "^country.*"
|
||||
line: country={{ host_country_code }}
|
||||
|
|
@ -54,8 +54,8 @@
|
|||
src: network/dnsmasq-iiab
|
||||
when: iiab_lan_iface == "br0"
|
||||
|
||||
- name: Stopping services
|
||||
include_tasks: down-debian.yml
|
||||
#- name: Stopping services
|
||||
# include_tasks: down-debian.yml
|
||||
|
||||
- name: Reload systemd
|
||||
systemd:
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@
|
|||
|
||||
#when: wan_ip != "dhcp" and not is_ubuntu_18
|
||||
|
||||
- name: Stopping services
|
||||
include_tasks: down-debian.yml
|
||||
#- name: Stopping services
|
||||
# include_tasks: down-debian.yml
|
||||
|
||||
- name: Reload systemd
|
||||
systemd:
|
||||
|
|
@ -64,9 +64,17 @@
|
|||
enabled: yes
|
||||
masked: no
|
||||
|
||||
- name: Enable & Restart systemd-resolved.service
|
||||
systemd:
|
||||
name: systemd-resolved
|
||||
state: restarted
|
||||
enabled: yes
|
||||
masked: no
|
||||
|
||||
- name: Enable & Restart networkd-dispatcher.service
|
||||
systemd:
|
||||
name: networkd-dispatcher
|
||||
state: restarted
|
||||
enabled: yes
|
||||
masked: no
|
||||
when: not is_linuxmint
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue