mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 19:52:06 +00:00
131 lines
2.9 KiB
YAML
131 lines
2.9 KiB
YAML
|
|
#- include_vars: roles/network/defaults/main.yml
|
|
#- include_vars: vars/local_vars.yml
|
|
|
|
- include_tasks: detected_network.yml
|
|
when: not installing
|
|
tags:
|
|
- network
|
|
- network-discover
|
|
|
|
- name: RPi hack for AP post install via wifi so the services are right
|
|
set_fact:
|
|
iiab_lan_iface: br0
|
|
iiab_wan_iface: "{{ discovered_wired_iface }}"
|
|
iiab_wireless_lan_iface: "{{ discovered_wireless_iface }}"
|
|
iiab_wired_lan_iface: ""
|
|
when: is_rpi and discovered_wireless_iface is defined and discovered_wireless_iface == iiab_wan_iface
|
|
|
|
- include_tasks: computed_network.yml
|
|
when: not installing
|
|
tags:
|
|
- network
|
|
- network-discover
|
|
|
|
- include_tasks: hostapd.yml
|
|
tags:
|
|
- network
|
|
- AP
|
|
|
|
- name: RPi hack for AP post install via wifi don't blow away current network
|
|
set_fact:
|
|
no_net_restart: True
|
|
hostapd_enabled: False
|
|
when: is_rpi and discovered_wireless_iface is defined and discovered_wired_iface != iiab_wan_iface
|
|
|
|
##### Start static ip address info for first run #####
|
|
#- include_tasks: static.yml
|
|
# when: 'iiab_wan_iface != "none" and wan_ip != "dhcp"'
|
|
##### End static ip address info
|
|
|
|
- include_tasks: hosts.yml
|
|
tags:
|
|
- network
|
|
- hostname
|
|
- domain
|
|
|
|
- name: Configuring wondershaper
|
|
include_tasks: wondershaper.yml
|
|
when: wondershaper_install
|
|
tags: wondershaper, network
|
|
|
|
- name: (Re)Installing named
|
|
include_tasks: named.yml
|
|
when: FQDN_changed and iiab_stage|int == 9
|
|
|
|
- name: (Re)Installing dhcpd
|
|
include_tasks: dhcpd.yml
|
|
when: FQDN_changed and iiab_stage|int == 9
|
|
|
|
- name: (Re)Installing Squid
|
|
include_tasks: squid.yml
|
|
when: FQDN_changed and squid_install and iiab_stage|int == 9
|
|
|
|
#### start services
|
|
- include_tasks: avahi.yml
|
|
tags:
|
|
- network
|
|
|
|
- include_tasks: computed_services.yml
|
|
tags:
|
|
- network
|
|
- named
|
|
- dhcpd
|
|
- dnsmasq
|
|
- squid
|
|
|
|
- include_tasks: enable_services.yml
|
|
tags:
|
|
- network
|
|
- named
|
|
- dhcpd
|
|
- dnsmasq
|
|
- squid
|
|
|
|
#### end services
|
|
#### Start network layout
|
|
|
|
- include_tasks: ifcfg_mods.yml
|
|
tags:
|
|
- network
|
|
when: is_redhat and not installing
|
|
|
|
- include_tasks: debian.yml
|
|
tags:
|
|
- network
|
|
when: is_debuntu
|
|
#and not is_rpi and not installing
|
|
|
|
#- include_tasks: rpi_debian.yml
|
|
# tags:
|
|
# - network
|
|
# when: is_debuntu and is_rpi and not installing
|
|
|
|
- name: Record iiab_wan_device
|
|
lineinfile: dest=/etc/iiab/iiab.env
|
|
regexp='^IIAB_WAN_DEVICE=*'
|
|
line='IIAB_WAN_DEVICE="{{ iiab_wan_iface }}"'
|
|
state=present
|
|
when: not installing
|
|
tags:
|
|
- network
|
|
|
|
- name: Record iiab_lan_device
|
|
lineinfile: dest=/etc/iiab/iiab.env
|
|
regexp='^IIAB_LAN_DEVICE=*'
|
|
line='IIAB_LAN_DEVICE="{{ iiab_lan_iface }}"'
|
|
state=present
|
|
when: not installing
|
|
tags:
|
|
- network
|
|
|
|
#### end network layout
|
|
- include_tasks: restart.yml
|
|
when: not installing
|
|
tags:
|
|
- network
|
|
- named
|
|
- dhcpd
|
|
- dnsmasq
|
|
- squid
|
|
- AP
|