diff --git a/roles/1-prep/defaults/main.yml b/roles/1-prep/defaults/main.yml index 71af080a7..89df65e47 100644 --- a/roles/1-prep/defaults/main.yml +++ b/roles/1-prep/defaults/main.yml @@ -6,49 +6,26 @@ gui_version: 2 # These are defaults for boolean routines, first_run: False installing: False -NUC6_firmware_needed: False -exFAT_enabled: False -no_NM_reload: False -has_WAN: False -wireless_lan_present: False -strict_networking: False -iiab_demo_mode: False -gw_active: False -gui_static_wan: False +discovered_wan_iface: "none" +gw_active: "none" internet_available: False is_F18: False +no_NM_reload: False +exFAT_enabled: False +gui_port: 80 + +# Set default for discovered hardware +rpi_model: none +is_rpi: False +xo_model: none +rtc_id: ds3231 +NUC6_firmware_needed: False + +# used in 2-common xo.yml +wifi_id: none + is_F20: False is_F21: False is_F22: False is_F23: False is_F24: False - -# Set default for discovered hardware -driver_name: nl80211 -rpi_model: none -is_rpi: False -xo_model: none -rtc_id: ds3231 - -# Set defaults for discovery process as strings -wifi1: "not found-1" -wifi2: "not found-2" -discovered_wan_iface: "none" -discovered_lan_iface: "none" -discovered_wireless_iface: "none" -iiab_wireless_lan_iface: "none" -iiab_lan_iface: "none" -iiab_wan_iface: "none" -device_gw: "none" -has_ifcfg_gw: "none" -has_wifi_gw: "none" -ap_device: "none" -device_gw2: "" - -gui_port: 80 - -# must keep roles/iiab-admin/defaults/main.yml sync'd -admin_console_path: "{{ iiab_base }}/admin_console" -cmdsrv_path: "{{ iiab_base }}/iiab_cmdsrv" -iiab_cmdsrv_dbname : "iiab_cmdsrv.0.2.db" -wifi_id: none diff --git a/roles/1-prep/tasks/main.yml b/roles/1-prep/tasks/main.yml index 49672c3a8..60b896567 100644 --- a/roles/1-prep/tasks/main.yml +++ b/roles/1-prep/tasks/main.yml @@ -1,8 +1,3 @@ -- name: Set flag for fedora 18 - set_fact: - is_F18: True - when: ansible_distribution_release == "based on Fedora 18" or ansible_distribution_version == "18" - - name: get the uuidgen program package: name=uuid-runtime state=present diff --git a/roles/netvars/tasks/main.yml b/roles/netvars/tasks/main.yml index 68b4c2b66..54ec4b7d3 100644 --- a/roles/netvars/tasks/main.yml +++ b/roles/netvars/tasks/main.yml @@ -6,12 +6,10 @@ set_fact: first_run: True when: not NewInstall.stat.exists -# when: NewInstall.stat.exists is defined and not NewInstall.stat.exists -# we need to inialize the ini file +# we need to inialize the ini file and only write the location and version sections once and only +# once to preserve the install date and git hash. - include: roles/1-prep/tasks/iiab_ini.yml when: first_run - +# Now load the computed vars - include: roles/1-prep/tasks/computed_vars.yml -- include: roles/1-prep/tasks/detected_network.yml - when: not installing diff --git a/roles/network/defaults/main.yml b/roles/network/defaults/main.yml index 722761dda..25c7b6b31 100644 --- a/roles/network/defaults/main.yml +++ b/roles/network/defaults/main.yml @@ -1,10 +1,36 @@ --- +# Defaults for network detection +wireless_lan_present: False +strict_networking: False +iiab_demo_mode: False +gui_static_wan: False + +# Set defaults for discovery process as strings +wifi1: "not found-1" +wifi2: "not found-2" +discovered_lan_iface: "none" +discovered_wireless_iface: "none" +#Redhat +iiab_lan_iface: "none" +iiab_wan_iface: "none" +iiab_wireless_lan_iface: "none" +device_gw: "none" +device_gw2: "" +has_WAN: False +has_ifcfg_gw: "none" +has_wifi_gw: "none" +ap_device: "none" +#Debian +dhcpcd_result: "" +wan_in_interfaces: False + # The values here are default local variables. gui_wan_iface: "unset" gui_static_wan_ip: "unset" gui_desired_network_role: Gateway wondershaper_dspeed: "4096" wondershaper_upspeed: "1024" + # WiFi host_ssid: IIAB hostapd_wait: 10 @@ -15,6 +41,7 @@ host_country_code: US hostapd_secure: True hostapd_password: "iiab2017" driver_name: nl80211 + network_config_dir: /etc/network/interfaces.d iiab_network_mode: "Gateway" dns_jail_enabled: False diff --git a/roles/1-prep/tasks/detected_network.yml b/roles/network/tasks/detected_network.yml similarity index 100% rename from roles/1-prep/tasks/detected_network.yml rename to roles/network/tasks/detected_network.yml diff --git a/roles/1-prep/tasks/detected_redhat.yml b/roles/network/tasks/detected_redhat.yml similarity index 100% rename from roles/1-prep/tasks/detected_redhat.yml rename to roles/network/tasks/detected_redhat.yml diff --git a/roles/network/tasks/main.yml b/roles/network/tasks/main.yml index 5e93f5c3f..20a94af78 100644 --- a/roles/network/tasks/main.yml +++ b/roles/network/tasks/main.yml @@ -1,3 +1,9 @@ +- include: detected_network.yml + when: not installing + tags: + - network + - network-discover + - include: computed_network.yml when: not installing tags: