mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
commit
3d4daf1c23
8 changed files with 25 additions and 24 deletions
|
@ -8,7 +8,7 @@
|
|||
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!
|
||||
|
||||
elgg_xx: elgg
|
||||
elgg_version: 2.3.13
|
||||
elgg_version: 2.3.14
|
||||
|
||||
# elgg_mysql_password: defined in default_vars
|
||||
elgg_url: /elgg
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
- name: Setting XO has WiFi gateway
|
||||
set_fact:
|
||||
user_wan_iface: "{{ discovered_wan_iface }}"
|
||||
when: discovered_wan_iface != "none" and xo_model != "none" and has_ifcfg_gw == "none"
|
||||
when: not (discovered_wan_iface == "none") and not (xo_model == "none") and has_ifcfg_gw == "none"
|
||||
|
||||
#- name: Checking for NetworkManager-config-server
|
||||
# shell: rpm -qa | grep NetworkManager-config-server | wc -l
|
||||
|
@ -23,19 +23,19 @@
|
|||
- name: XO laptop wants USB WiFi interface as AP mode
|
||||
set_fact:
|
||||
iiab_wireless_lan_iface: "{{ discovered_lan_iface }}"
|
||||
when: num_wifi_interfaces >= "2" and xo_model != "none" and discovered_wan_iface != "none" and discovered_wireless_iface == "eth0"
|
||||
when: num_wifi_interfaces >= "2" and not (xo_model == "none") and not (discovered_wan_iface == "none") and discovered_wireless_iface == "eth0"
|
||||
|
||||
# static backout suppy new template file
|
||||
- name: gui-static-wan
|
||||
set_fact:
|
||||
wan_ip: dhcp
|
||||
gui_static_wan_ip: undefined
|
||||
when: gui_static_wan_ip != "unset" and not gui_static_wan
|
||||
when: not (gui_static_wan_ip == "unset") and not gui_static_wan
|
||||
|
||||
- name: Undo gui-static-wan by requesting new template file
|
||||
set_fact:
|
||||
has_WAN: False
|
||||
when: gui_static_wan_ip != "unset" and not gui_static_wan
|
||||
when: not (gui_static_wan_ip == "unset") and not gui_static_wan
|
||||
|
||||
# figure out more than one interfaces to detect.
|
||||
- name: Using GUI_STATIC info
|
||||
|
@ -46,7 +46,7 @@
|
|||
wan_netmask: "{{ gui_static_wan_netmask }}"
|
||||
wan_gateway: "{{ gui_static_wan_gateway }}"
|
||||
wan_nameserver: "{{ gui_static_wan_nameserver }}"
|
||||
when: gui_static_wan or user_wan_iface != "auto"
|
||||
when: gui_static_wan or not (user_wan_iface == "auto")
|
||||
|
||||
# we need to have an interface name for ifcfg-WAN to be able to change gateway
|
||||
# the DEVICE from the gui. Thanks to George for proving my point about knowing
|
||||
|
@ -61,7 +61,6 @@
|
|||
set_fact:
|
||||
user_wan_iface: "none"
|
||||
when: not iiab_wan_enabled
|
||||
#when: 'not iiab_wan_enabled'
|
||||
|
||||
# gui wants LanController # keeps ifcfg-WAN but onboot=no
|
||||
# the change over might be a little bumpy ATM.
|
||||
|
@ -79,19 +78,19 @@
|
|||
- name: Setting user_lan_iface for 'LanController' for single interface
|
||||
set_fact:
|
||||
user_lan_iface: "{{ discovered_wan_iface }}"
|
||||
when: discovered_wan_iface != "none" and num_lan_interfaces == "0" and gui_desired_network_role is defined and gui_desired_network_role == "LanController"
|
||||
when: not (discovered_wan_iface == "none") and num_lan_interfaces == "0" and gui_desired_network_role is defined and gui_desired_network_role == "LanController"
|
||||
|
||||
# override with user_wan_iface setting if no longer in auto
|
||||
- name: Setting user WAN fact
|
||||
set_fact:
|
||||
iiab_wan_iface: "{{ user_wan_iface }}"
|
||||
when: user_wan_iface != "auto"
|
||||
when: not (user_wan_iface == "auto")
|
||||
|
||||
# user disabled interface - overriding all other entries
|
||||
- name: Checking iiab_lan_enabled
|
||||
set_fact:
|
||||
user_lan_iface: "none"
|
||||
when: 'not iiab_lan_enabled'
|
||||
when: not iiab_lan_enabled
|
||||
|
||||
# gui wants Appliance Note: could of used iiab_lan_enabled false
|
||||
- name: Setting GUI wants 'Appliance'
|
||||
|
@ -105,7 +104,7 @@
|
|||
set_fact:
|
||||
user_lan_iface: "auto"
|
||||
user_wan_iface: "{{ iiab_wan_iface }}"
|
||||
when: gui_desired_network_role is defined and gui_desired_network_role == "Gateway" and iiab_wan_iface != "none"
|
||||
when: gui_desired_network_role is defined and gui_desired_network_role == "Gateway" and not (iiab_wan_iface == "none")
|
||||
|
||||
# make it so number 2 vars should use user_wan_iface but we can cover a single
|
||||
# wired if dhcp fails the interface should revert to LAN, static address should
|
||||
|
@ -121,7 +120,7 @@
|
|||
- name: Use old gateway device info if not detected and using static ip
|
||||
set_fact:
|
||||
iiab_wan_iface: "{{ device_gw }}"
|
||||
when: wan_ip != "dhcp" and iiab_wan_iface == "none"
|
||||
when: not (wan_ip == "dhcp") and iiab_wan_iface == "none"
|
||||
|
||||
- name: No LAN configured - 'Appliance' mode
|
||||
set_fact:
|
||||
|
@ -131,12 +130,12 @@
|
|||
- name: LAN configured - 'LanController' mode
|
||||
set_fact:
|
||||
iiab_network_mode: "LanController"
|
||||
when: iiab_lan_iface != "none" and iiab_wan_iface == "none"
|
||||
when: not (iiab_lan_iface == "none") and iiab_wan_iface == "none"
|
||||
|
||||
- name: LAN configured - 'Gateway' mode
|
||||
set_fact:
|
||||
iiab_network_mode: "Gateway"
|
||||
when: (iiab_lan_iface != "none" and iiab_wan_iface != "none") or is_rpi
|
||||
when: is_rpi or (not (iiab_lan_iface == "none") and not (iiab_wan_iface == "none"))
|
||||
|
||||
- name: Force iiab_lan_iface if is_rpi
|
||||
set_fact:
|
||||
|
@ -147,13 +146,13 @@
|
|||
- name: Enable hostapd if discovered_wireless_iface is not WAN
|
||||
set_fact:
|
||||
hostapd_enabled: True
|
||||
when: is_rpi and iiab_wan_iface != discovered_wireless_iface
|
||||
when: is_rpi and not (iiab_wan_iface == discovered_wireless_iface)
|
||||
|
||||
# override with user_lan_iface setting if no longer in auto
|
||||
- name: Setting user LAN fact
|
||||
set_fact:
|
||||
iiab_lan_iface: "{{ user_lan_iface }}"
|
||||
when: 'user_lan_iface != "auto"'
|
||||
when: not (user_lan_iface == "auto")
|
||||
|
||||
# so this works
|
||||
- name: Interface count
|
||||
|
|
|
@ -49,18 +49,18 @@
|
|||
src: network/rpi.j2
|
||||
when: is_rpi and iiab_lan_iface == "br0"
|
||||
|
||||
- name: Workaround auto issue - ifupdown compatibility mode (debian-9)
|
||||
- name: Workaround auto issue - ifupdown compatibility mode (debian-9+)
|
||||
template:
|
||||
dest: /etc/network/interfaces.d/patch_auto
|
||||
src: network/debian-auto.j2
|
||||
when: iiab_wan_iface != "none" and is_debian_9
|
||||
when: iiab_wan_iface != "none" and is_debian and not is_debian_8
|
||||
|
||||
- name: Clearing out /etc/network/interfaces for static addresses (debian-9)
|
||||
- name: Clearing out /etc/network/interfaces for static addresses (debian-9+)
|
||||
lineinfile:
|
||||
state: absent
|
||||
path: /etc/network/interfaces
|
||||
regexp: "{{ iiab_wan_iface }}"
|
||||
when: wan_ip != "dhcp" and iiab_wan_iface != "none" and is_debian_9
|
||||
when: wan_ip != "dhcp" and iiab_wan_iface != "none" and is_debian and not is_debian_8
|
||||
|
||||
- name: BIND may be affected
|
||||
service:
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
regexp: '^172\.18\.96\.1'
|
||||
line: '172.18.96.1 {{ iiab_hostname }}.{{ iiab_domain }} {{ iiab_hostname }} box box.lan'
|
||||
state: present
|
||||
when: iiab_lan_iface != "none" and not installing
|
||||
when: not (iiab_lan_iface == "none") and not installing
|
||||
|
||||
# roles/0-init/tasks/hostname.yml ALSO does this:
|
||||
- name: 'Put FQDN & hostnames in /etc/hosts: "127.0.0.1 {{ iiab_hostname }}.{{ iiab_domain }} localhost.localdomain localhost {{ iiab_hostname }} box box.lan" (if iiab_lan_iface == "none" and not installing, appliance mode?)'
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
# Supplied by iiab-install or iiab-network (in /opt/iiab/iiab)
|
||||
|
||||
auto {{ iiab_wan_iface }}
|
||||
|
|
|
@ -180,7 +180,7 @@ def create_menu_def(region,default_name,intended_use='map'):
|
|||
menuDef["map_name"] = item['perma_ref']
|
||||
# the following is in the idx json
|
||||
#menuDef["file_name"] = lang + '-osm-omt_' + region + '_' + os.path.basename(item['url'])[:-4]
|
||||
menuDef["description"] = '18 levels of zoom (~1 m details) for ' + fancyTitle + ', illustrating human geography.<p>10 levels of zoom (~1 km details) for satellite photos, covering the whole world.'
|
||||
menuDef["description"] = '19 levels of zoom (~1 m details) for ' + fancyTitle + ', illustrating human geography.<p>10 levels of zoom (~1 km details) for satellite photos, covering the whole world.'
|
||||
menuDef["extra_description"] = 'Search for cities/towns with more than 1000 people. There are about 127,654 worldwide.'
|
||||
menuDef["extra_html"] = ""
|
||||
#menuDef["automatically_generated"] = "true"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
CURR_VER="undefined" # Ansible version you currently have installed
|
||||
GOOD_VER="2.8.2" # For XO laptops (pip install) & CentOS (yum install rpm)
|
||||
GOOD_VER="2.8.3" # For XO laptops (pip install) & CentOS (yum install rpm)
|
||||
# On other OS's we attempt the latest from PPA, which might be more recent
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
CURR_VER="undefined" # Ansible version you currently have installed
|
||||
GOOD_VER="2.8.2" # For XO laptops (pip install) & CentOS (yum install rpm)
|
||||
GOOD_VER="2.8.3" # For XO laptops (pip install) & CentOS (yum install rpm)
|
||||
# On other OS's we attempt the latest from PPA, which might be more recent
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
|
Loading…
Reference in a new issue