2020-08-02 18:36:56 +00:00
|
|
|
- name: Select RPi firmware mode
|
|
|
|
include_role:
|
|
|
|
name: firmware
|
|
|
|
when: rpi_model != "none"
|
|
|
|
|
2020-05-04 12:51:45 +00:00
|
|
|
- name: detected_network
|
|
|
|
include_tasks: detected_network.yml
|
2018-01-01 16:45:19 +00:00
|
|
|
|
2020-09-13 00:40:30 +00:00
|
|
|
#- name: "Set 'no_net_restart: True' if discovered_wireless_iface == iiab_wan_iface"
|
|
|
|
- name: "Set 'no_net_restart: True' if has_wifi_gateway is defined"
|
2017-12-28 23:57:22 +00:00
|
|
|
set_fact:
|
2020-09-13 00:58:10 +00:00
|
|
|
no_net_restart: True # 2020-09-12:
|
|
|
|
# 0-init/defaults/main.yml - default boolean value of False
|
2020-09-13 01:11:36 +00:00
|
|
|
# network/tasks/main.yml - changes flag based on conditional present
|
2020-09-13 01:07:26 +00:00
|
|
|
# Var is currently used in 9 subsequent files, to suppress restarting of
|
2020-09-13 00:58:10 +00:00
|
|
|
# hostapd, dnsmasq and/or other networking service in computed_services.yml,
|
2020-09-13 00:40:30 +00:00
|
|
|
# debian.yml, detected_network.yml, down-debian.yml, netplan.yml,
|
|
|
|
# NM-debian.yml, restart.yml, rpi_debian.yml, sysd-netd-debian.yml
|
2020-09-12 01:33:31 +00:00
|
|
|
when: has_wifi_gateway is defined
|
2020-04-14 13:03:00 +00:00
|
|
|
|
2020-05-04 12:51:45 +00:00
|
|
|
- name: computed_network
|
|
|
|
include_tasks: computed_network.yml
|
2017-11-18 22:20:30 +00:00
|
|
|
|
2021-08-14 20:18:12 +00:00
|
|
|
# - name: Configure wondershaper
|
|
|
|
# include_tasks: wondershaper.yml
|
|
|
|
# when: wondershaper_install or wondershaper_installed is defined
|
2017-11-13 02:57:13 +00:00
|
|
|
|
2019-01-16 09:49:30 +00:00
|
|
|
- name: (Re)Install named
|
2017-11-13 02:57:13 +00:00
|
|
|
include_tasks: named.yml
|
2019-01-16 09:32:04 +00:00
|
|
|
when: named_install and FQDN_changed and iiab_stage|int == 9
|
2017-11-13 02:57:13 +00:00
|
|
|
|
2019-01-16 09:49:30 +00:00
|
|
|
- name: (Re)Install dhcpd
|
2017-11-13 02:57:13 +00:00
|
|
|
include_tasks: dhcpd.yml
|
2019-01-16 09:32:04 +00:00
|
|
|
when: dhcpd_install and FQDN_changed and iiab_stage|int == 9
|
2017-11-13 02:57:13 +00:00
|
|
|
|
2021-08-15 11:59:35 +00:00
|
|
|
- name: (Re)Install Squid
|
|
|
|
include_tasks: squid.yml
|
|
|
|
when: squid_install and FQDN_changed and iiab_stage|int == 9
|
2017-11-13 02:57:13 +00:00
|
|
|
|
2020-05-01 00:35:15 +00:00
|
|
|
#preprep for backends
|
|
|
|
- name: Netplan in use on Ubuntu 18.04+
|
|
|
|
include_tasks: netplan.yml
|
|
|
|
when: is_ubuntu and not is_ubuntu_16
|
|
|
|
|
2020-01-30 10:06:22 +00:00
|
|
|
#### Start services
|
2020-05-04 12:51:45 +00:00
|
|
|
- name: avahi
|
|
|
|
include_tasks: avahi.yml
|
|
|
|
- name: hostapd
|
|
|
|
include_tasks: hostapd.yml
|
|
|
|
- name: computed_services
|
|
|
|
include_tasks: computed_services.yml
|
|
|
|
- name: enable_services
|
|
|
|
include_tasks: enable_services.yml
|
2020-01-30 10:06:22 +00:00
|
|
|
#### End services
|
|
|
|
|
2017-11-01 14:15:59 +00:00
|
|
|
#### Start network layout
|
2020-05-04 12:51:45 +00:00
|
|
|
#- name: Redhat networking
|
|
|
|
# include_tasks: ifcfg_mods.yml
|
2020-10-16 20:46:19 +00:00
|
|
|
# when: is_redhat
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2018-12-14 19:54:46 +00:00
|
|
|
- name: NetworkManager in use
|
2017-11-23 04:57:38 +00:00
|
|
|
include_tasks: NM-debian.yml
|
2018-12-14 19:54:46 +00:00
|
|
|
when: is_debuntu and network_manager_active
|
2017-11-23 02:26:23 +00:00
|
|
|
|
2018-12-14 19:54:46 +00:00
|
|
|
- name: systemd-networkd in use
|
2017-11-23 04:57:38 +00:00
|
|
|
include_tasks: sysd-netd-debian.yml
|
2018-12-14 19:54:46 +00:00
|
|
|
when: is_debuntu and systemd_networkd_active
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2020-03-10 16:42:21 +00:00
|
|
|
- name: Raspbian uses dhcpcd only with no N-M or SYS-NETD active
|
2017-11-23 04:57:38 +00:00
|
|
|
include_tasks: rpi_debian.yml
|
2020-03-04 23:00:01 +00:00
|
|
|
when: is_raspbian
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2017-11-23 04:57:38 +00:00
|
|
|
- name: Not RPi, Not NetworkManager, Not systemd-networkd in use
|
|
|
|
include_tasks: debian.yml
|
2020-03-04 23:00:01 +00:00
|
|
|
when: (not is_raspbian and not network_manager_active and not systemd_networkd_active and is_debuntu) or is_ubuntu_16
|
2017-10-15 20:08:08 +00:00
|
|
|
#### end network layout
|
2020-01-30 10:06:22 +00:00
|
|
|
|
2020-05-04 12:51:45 +00:00
|
|
|
- name: Restart services
|
|
|
|
include_tasks: restart.yml
|