From 6b0c682d9e70b39da69106075e8feeaa17bcdacf Mon Sep 17 00:00:00 2001 From: icebox827 Date: Mon, 22 Nov 2021 11:34:20 -0400 Subject: [PATCH 1/4] Update install.yml file --- roles/jupyterhub/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/jupyterhub/tasks/install.yml b/roles/jupyterhub/tasks/install.yml index 659e48ccc..a29726d17 100644 --- a/roles/jupyterhub/tasks/install.yml +++ b/roles/jupyterhub/tasks/install.yml @@ -39,7 +39,7 @@ - pip - wheel - ipywidgets - - jupyterhub + - jupyterhub==2.0.0rc4 - jupyterlab - jupyterhub_firstuseauthenticator - jupyterhub-systemdspawner From c7fde4a0cf7034edd69f52e72080614b6342cdd8 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 27 Nov 2021 09:47:23 -0500 Subject: [PATCH 2/4] iiab-diagnostics: Emphasize /proc/device-tree/model --- scripts/iiab-diagnostics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/iiab-diagnostics b/scripts/iiab-diagnostics index e861b7fb0..b91a6431a 100755 --- a/scripts/iiab-diagnostics +++ b/scripts/iiab-diagnostics @@ -119,7 +119,7 @@ echo "iiab commit: $HASH1" >> $outfile echo "iiab-admin-console commit: $HASH2" >> $outfile echo >> $outfile cat_file /etc/iiab/pr-list-pulled -cat_file /sys/firmware/devicetree/base/model +cat_file /proc/device-tree/model # Should be identical to /sys/firmware/devicetree/base/model cat_file /etc/rpi-issue echo "-IIAB-EXPLANATION-OF-THE-ABOVE-------------------------------------------------" >> $outfile echo >> $outfile From e16e22c6c570b28af63db94af8a766ba5ef00037 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 27 Nov 2021 10:36:20 -0500 Subject: [PATCH 3/4] Record var devicetree_model to /etc/iiab/iiab.ini --- roles/0-init/tasks/create_iiab_ini.yml | 2 ++ roles/0-init/tasks/main.yml | 5 ++++- scripts/local_facts.fact | 10 +++++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/roles/0-init/tasks/create_iiab_ini.yml b/roles/0-init/tasks/create_iiab_ini.yml index 0f2357d07..d29f791c8 100644 --- a/roles/0-init/tasks/create_iiab_ini.yml +++ b/roles/0-init/tasks/create_iiab_ini.yml @@ -39,3 +39,5 @@ # value: "{{ xo_model }}" - option: rpi_model value: "{{ rpi_model }}" + - option: devicetree_model + value: "{{ devicetree_model }}" diff --git a/roles/0-init/tasks/main.yml b/roles/0-init/tasks/main.yml index a532bc8ac..8d93f2441 100644 --- a/roles/0-init/tasks/main.yml +++ b/roles/0-init/tasks/main.yml @@ -7,9 +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 10 vars -- here we extract 2 of those -- rpi_model: {{ ansible_local.local_facts.rpi_model }}, iiab_stage: {{ ansible_local.local_facts.stage }}" +- 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 }}, devicetree_model: {{ ansible_local.local_facts.devicetree_model }}, iiab_stage: {{ ansible_local.local_facts.stage }}" set_fact: rpi_model: "{{ ansible_local.local_facts.rpi_model }}" + devicetree_model: "{{ ansible_local.local_facts.devicetree_model }}" #xo_model: "{{ ansible_local.local_facts.xo_model }}" iiab_stage: "{{ ansible_local.local_facts.stage }}" @@ -93,6 +94,8 @@ value: "{{ internet_available }}" - option: rpi_model value: "{{ rpi_model }}" + - option: devicetree_model + value: "{{ devicetree_model }}" - option: first_run value: "{{ first_run }}" - option: local_tz # e.g. 'EDT' (summer) or 'EST' (winter) after Ansible interprets symlink /etc/localtime -- or 'UTC' if /etc/localtime doesn't exist diff --git a/scripts/local_facts.fact b/scripts/local_facts.fact index de435a86d..168aaf84a 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 10 variables require a command[*] to be run to +# 2020-10-27: Most of the 11 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 @@ -16,6 +16,7 @@ IIAB_BRANCH="none" IIAB_COMMIT="none" #XO_MODEL="none" RPI_MODEL="none" +DEVICETREE_MODEL="none" ANSIBLE_VERSION="none" DHCPCD="none" # The last 3 conditioned on string output not RC. SEE BELOW. NETWORK_MANAGER="none" @@ -97,6 +98,12 @@ tmp=$(git rev-parse --verify HEAD) && tmp=$(grep -ai raspberry /proc/device-tree/model) && RPI_MODEL=$tmp +# /proc/device-tree/model e.g. 'Parallels ARM Virtual Machine' identical to... +# /sys/firmware/devicetree/base/model (also true on RPi hardware!) + +tmp=$(cat /proc/device-tree/model) && + DEVICETREE_MODEL=$tmp + tmp=$(ansible --version) && ANSIBLE_VERSION=$(echo "$tmp" | head -1 | cut -f 2- -d " " | sed 's/.* \([^ ]*\)\].*/\1/') # Above works with 'ansible [core 2.11.0rc2]' -- these old ways do not: @@ -134,6 +141,7 @@ cat < Date: Sat, 27 Nov 2021 10:39:40 -0500 Subject: [PATCH 4/4] Oops: Revert roles/jupyterhub/tasks/install.yml --- roles/jupyterhub/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/jupyterhub/tasks/install.yml b/roles/jupyterhub/tasks/install.yml index a29726d17..659e48ccc 100644 --- a/roles/jupyterhub/tasks/install.yml +++ b/roles/jupyterhub/tasks/install.yml @@ -39,7 +39,7 @@ - pip - wheel - ipywidgets - - jupyterhub==2.0.0rc4 + - jupyterhub - jupyterlab - jupyterhub_firstuseauthenticator - jupyterhub-systemdspawner