1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-15 04:32:11 +00:00
iiab/roles/network/tasks/main.yml

74 lines
2.2 KiB
YAML
Raw Normal View History

2020-05-04 12:51:45 +00:00
- name: detected_network
include_tasks: detected_network.yml
- name: IF WIFI IS PRIMARY GATEWAY, PLEASE RUN 'iiab-hotspot-on' MANUALLY
set_fact:
no_net_restart: True # used below in (1) sysd-netd-debian.yml,
# (2) debian.yml, (3) rpi_debian.yml,
# (4) NM-debian.yml
when: discovered_wireless_iface == iiab_wan_iface
# EITHER WAY: hostapd_enabled's state is RECORDED into {{ iiab_env_file }}
2018-04-09 00:57:49 +00:00
# in hostapd.yml for later use by...
# /usr/libexec/iiab-startup.sh, iiab-hotspot-off & iiab-hotspot-on
#
2020-05-04 12:51:45 +00:00
- name: computed_network
include_tasks: computed_network.yml
2019-01-16 09:49:30 +00:00
- name: Configure wondershaper
include_tasks: wondershaper.yml
when: wondershaper_install or wondershaper_installed is defined
2019-01-16 09:49:30 +00:00
- name: (Re)Install named
include_tasks: named.yml
when: named_install and FQDN_changed and iiab_stage|int == 9
2019-01-16 09:49:30 +00:00
- name: (Re)Install dhcpd
include_tasks: dhcpd.yml
when: dhcpd_install and FQDN_changed and iiab_stage|int == 9
2019-01-16 09:49:30 +00:00
- 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+
include_tasks: netplan.yml
when: is_ubuntu and not is_ubuntu_16
#### 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
#### End services
#### Start network layout
2020-05-04 12:51:45 +00:00
#- name: Redhat networking
# include_tasks: ifcfg_mods.yml
# when: is_redhat | bool
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
- 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
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
when: (not is_raspbian and not network_manager_active and not systemd_networkd_active and is_debuntu) or is_ubuntu_16
#### end network layout
2020-05-04 12:51:45 +00:00
- name: Restart services
include_tasks: restart.yml