diff --git a/roles/0-init/defaults/main.yml b/roles/0-init/defaults/main.yml index a1ae1d0f7..16a56d688 100644 --- a/roles/0-init/defaults/main.yml +++ b/roles/0-init/defaults/main.yml @@ -5,29 +5,41 @@ # These entries should never be changed in this file. # These are defaults for boolean routines. + +# 2021-07-30: This variable (first_run) is still used in 2 places: +# (1) roles/1-prep/tasks/main.yml for raspberry_pi.yml +# (2) roles/network/tasks/named.yml +# ...after it is set in 0-init/tasks/main.yml first_run: False -rpi_model: none -xo_model: none +rpi_model: none # 2021-07-30: Broadly used! +#xo_model: none # 2021-07-30: No longer used +# 2021-07-30: Recorded to /etc/iiab/iiab.ini but not used programmatically: gw_active: False +# 2021-07-30: Used broadly, but not in an organized way -- most all IIAB +# outfitting/provisioning happens online -- in situations where connectivity +# failures should be reported to the operator, rather than papered over: internet_available: False -discovered_wan_iface: none +discovered_wan_iface: none # 2021-07-30: Very broadly used! -# Old defs +# 2021-07-30: Primarily for Admin Console: later change to 443 for #2811 HTTPS? gui_port: 80 -is_F18: False +#is_F18: False # 2021-07-30: No longer used -# Set default 1-prep discovered hardware -rtc_id: none -NUC6_firmware_needed: False +# 2021-07-30: Barely used -- for {named, dhcpd, squid} in +# roles/network/tasks/main.yml -- after being set in 0-init/tasks/network.yml +FQDN_changed: False -# Used in 2-common/tasks/xo.yml -wifi_id: none +#rtc_id: none # 2021-07-30: Moved to 1-prep/defaults/main.yml +#NUC6_firmware_needed: False # 2021-07-30: Apparently never used + +#wifi_id: none # 2021-07-30: Had been used in 2-common/tasks/xo.yml # 2021-07-30: roles/network/tasks/squid.yml#L16 to stop Squid # ("when: not installing") is the only non-Fedora use of this var. # Earlier, this var HAD also been used in 2-common and 3-base-server. installing: False -# Network +# 2021-07-30: Broadly used across roles/network/tasks/*.yml -- but things might +# possibly change if roles/network becomes optional per #2876 ? no_net_restart: False -no_NM_reload: False +#no_NM_reload: False # 2021-07-30: Was used in roles/network/tasks/fedora/* diff --git a/roles/0-init/tasks/create_iiab_ini.yml b/roles/0-init/tasks/create_iiab_ini.yml index b5c3b29d3..0f2357d07 100644 --- a/roles/0-init/tasks/create_iiab_ini.yml +++ b/roles/0-init/tasks/create_iiab_ini.yml @@ -35,7 +35,7 @@ value: "{{ ansible_local.local_facts.iiab_commit }}" - option: install_date value: "{{ ansible_date_time.iso8601 }}" - - option: xo_model - value: "{{ xo_model }}" + #- option: xo_model + # value: "{{ xo_model }}" - option: rpi_model value: "{{ rpi_model }}" diff --git a/roles/0-init/tasks/main.yml b/roles/0-init/tasks/main.yml index 88dbefcdf..26fe41082 100644 --- a/roles/0-init/tasks/main.yml +++ b/roles/0-init/tasks/main.yml @@ -7,10 +7,10 @@ # Higher-level purpose explained at the bottom of: # https://github.com/iiab/iiab/blob/master/vars/default_vars.yml -- name: "Ansible just ran /etc/ansible/facts.d/local_facts.fact to set 11 vars -- here we extract 3 of those -- rpi_model: {{ ansible_local.local_facts.rpi_model }}, xo_model: {{ ansible_local.local_facts.xo_model }}, iiab_stage: {{ ansible_local.local_facts.stage }}" +- name: "Ansible just ran /etc/ansible/facts.d/local_facts.fact to set 10 vars -- here we extract 2 of those -- rpi_model: {{ ansible_local.local_facts.rpi_model }}, iiab_stage: {{ ansible_local.local_facts.stage }}" set_fact: rpi_model: "{{ ansible_local.local_facts.rpi_model }}" - xo_model: "{{ ansible_local.local_facts.xo_model }}" + #xo_model: "{{ ansible_local.local_facts.xo_model }}" iiab_stage: "{{ ansible_local.local_facts.stage }}" # Initialize /etc/iiab/iiab.ini writing the 'location' and 'version' sections @@ -99,10 +99,10 @@ value: "{{ local_tz }}" - option: etc_localtime.stdout # e.g. 'America/New_York' direct from symlink /etc/localtime -- or '' if /etc/localtime doesn't exist value: "{{ etc_localtime.stdout }}" - - option: no_NM_reload - value: "{{ no_NM_reload }}" - - option: is_F18 - value: "{{ is_F18 }}" + #- option: no_NM_reload + # value: "{{ no_NM_reload }}" + #- option: is_F18 + # value: "{{ is_F18 }}" - option: FQDN_changed value: "{{ FQDN_changed }}" diff --git a/roles/1-prep/defaults/main.yml b/roles/1-prep/defaults/main.yml new file mode 100644 index 000000000..961aaf0ea --- /dev/null +++ b/roles/1-prep/defaults/main.yml @@ -0,0 +1,2 @@ +rtc_id: none # 2021-07-30: Used in 1-prep/tasks/raspberry_pi.yml +#NUC6_firmware_needed: False # 2021-07-30: Apparently never used diff --git a/roles/network/tasks/computed_network.yml b/roles/network/tasks/computed_network.yml index 94f70833b..2f8ae3baf 100644 --- a/roles/network/tasks/computed_network.yml +++ b/roles/network/tasks/computed_network.yml @@ -1,15 +1,18 @@ # just lie about active gateway present on XOs to suppress ifcfg-WAN # auto-creation/moving with XOs using NM/system-connections/ via keyfile. # ifcfg-rh acts on /etc/sys*/net*/ifcfg-* where we search for devices. -- name: Setting XO has WiFi gateway - set_fact: - user_wan_iface: "{{ discovered_wan_iface }}" - when: not (discovered_wan_iface == "none") and not (xo_model == "none") and has_ifcfg_gw == "none" -- 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 not (xo_model == "none") and not (discovered_wan_iface == "none") and discovered_wireless_iface == "eth0" +# 2021-07-30: Var 'xo_model' is being deprecated +#- name: Setting XO has WiFi gateway +# set_fact: +# user_wan_iface: "{{ discovered_wan_iface }}" +# when: not (discovered_wan_iface == "none") and not (xo_model == "none") and has_ifcfg_gw == "none" + +# 2021-07-30: Var 'xo_model' is being deprecated +#- 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 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 diff --git a/scripts/local_facts.fact b/scripts/local_facts.fact index b7ec88a8e..e5a58cade 100755 --- a/scripts/local_facts.fact +++ b/scripts/local_facts.fact @@ -3,7 +3,7 @@ # Higher-level purpose explained at the bottom of: # https://github.com/iiab/iiab/blob/master/vars/default_vars.yml -# 2020-10-27: Most of the 11 variables require a command[*] to be run to +# 2020-10-27: Most of the 10 variables require a command[*] to be run to # establish the var's value. WE DISPLAY ALL ERRORS / DIAGNOSTICS AND CONTINUE. # # [*] DOESN'T MATTER WHAT COMMAND: so long as it fails with Return Code != 0 @@ -14,7 +14,7 @@ OS="none" VERSION_ID="none" # This var's combined with the above, before being output IIAB_BRANCH="none" IIAB_COMMIT="none" -XO_MODEL="none" +#XO_MODEL="none" RPI_MODEL="none" ANSIBLE_VERSION="none" DHCPCD="none" # The last 3 conditioned on string output not RC. SEE BELOW. @@ -87,8 +87,8 @@ tmp=$(git rev-parse --abbrev-ref HEAD) && tmp=$(git rev-parse --verify HEAD) && IIAB_COMMIT=$tmp -tmp=$(cat /proc/device-tree/mfg-data/MN) && - XO_MODEL=$tmp +#tmp=$(cat /proc/device-tree/mfg-data/MN) && +# XO_MODEL=$tmp tmp=$(cat /proc/device-tree/model) && RPI_MODEL=$tmp @@ -128,9 +128,10 @@ cat <