From bc7c0c811c07e788a24761be41dbed4a9eafd2e2 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 31 Jul 2021 18:01:17 -0400 Subject: [PATCH] Overhaul 1-prep/README.rst etc --- roles/1-prep/README.rst | 35 ++++++++++--------- .../tasks/{hw_platforms.yml => hardware.yml} | 0 roles/1-prep/tasks/main.yml | 2 +- roles/1-prep/tasks/raspberry_pi.yml | 3 ++ roles/2-common/tasks/main.yml | 2 ++ roles/4-server-options/tasks/main.yml | 3 ++ 6 files changed, 28 insertions(+), 17 deletions(-) rename roles/1-prep/tasks/{hw_platforms.yml => hardware.yml} (100%) diff --git a/roles/1-prep/README.rst b/roles/1-prep/README.rst index d2b3bb8ee..a0ab8a3a6 100644 --- a/roles/1-prep/README.rst +++ b/roles/1-prep/README.rst @@ -2,21 +2,24 @@ 1-prep README ============= -This 1st `stage `_ (1-prep) is primarily hardware-focused, prior to OS -additions/mods — but also includes critical pieces sometimes needed for -remote support: +This 1st `stage `_ (1-prep) arranges low-level things like hardware, DNS, basic security -- and critical pieces sometimes needed for remote support: -- dnsmasq -- /etc/iiab/uuid -- Customizing /var/log/* for Ubermix on each boot, using /etc/tmpfiles.d -- SSH -- `iiab-admin `_ username and group to log into Admin Console -- OpenVPN software if/as needed later for remote support -- `raspberry_pi.yml `_ including RTC, essential packages, and networking basics +- SSHD +- OpenVPN if/as needed later for remote support +- `iiab-admin `_ username and group, to log into Admin Console +- dnsmasq (install now, configure later!) +- Universally unique identifier: /etc/iiab/uuid +- Ubermix (distro) needs /etc/tmpfiles.d/iiab.conf to create essential /var/log subdirs on each boot +- Hardware actions: + - `raspberry_pi.yml `_: + - RTC (real-time clock): install udev rule, configure, enable + - Install packages related to: + - growpart + - swapfile + - fake-hwclock (as RTC is often missing or dead!) + - Wi-Fi + - Increase swap file size + - rootfs auto-resizing + - NUC 6 Wi-Fi firmware -Traditionally 1-prep also included preliminaries like hostname and -hardware-oriented things specific to a particular platform (such as -One Laptop Per Child's XO laptop) i.e. critical setup prior to the -bulk of IIAB's software install. - -Recap: Similar to 0-init, 2-common, 3-base-server, 4 server-options and 5-xo-services ⁠— this 1st stage installs core server infra (that is not user-facing). +Recap: Similar to 0-init, 2-common, 3-base-server, 4 server-options and 5-xo-services — this 1st stage installs core server infra (that is not user-facing). diff --git a/roles/1-prep/tasks/hw_platforms.yml b/roles/1-prep/tasks/hardware.yml similarity index 100% rename from roles/1-prep/tasks/hw_platforms.yml rename to roles/1-prep/tasks/hardware.yml diff --git a/roles/1-prep/tasks/main.yml b/roles/1-prep/tasks/main.yml index efaf78e54..36369aaee 100644 --- a/roles/1-prep/tasks/main.yml +++ b/roles/1-prep/tasks/main.yml @@ -24,7 +24,7 @@ - include_tasks: uuid.yml - include_tasks: ubermix.yml -- include_tasks: hw_platforms.yml +- include_tasks: hardware.yml # Debian 10 "Buster" is apparently enabling AppArmor in 2019: diff --git a/roles/1-prep/tasks/raspberry_pi.yml b/roles/1-prep/tasks/raspberry_pi.yml index 7bd1840f5..64530c9fc 100644 --- a/roles/1-prep/tasks/raspberry_pi.yml +++ b/roles/1-prep/tasks/raspberry_pi.yml @@ -31,6 +31,7 @@ # line: 'include btcfg.txt' # when: is_ubuntu + - name: '2021-07-27: SEE ALSO ~4 networking packages LATER installed by https://github.com/iiab/iiab/blob/master/roles/2-common/tasks/packages.yml' meta: noop @@ -55,6 +56,7 @@ - wireless-tools # 2021-07-27: RaspiOS installs this regardless -- manipulate Linux Wireless Extensions state: present + - name: Increase swap file size (to CONF_SWAPSIZE={{ pi_swap_file_size }} in /etc/dphys-swapfile) as kalite pip download fails lineinfile: path: /etc/dphys-swapfile @@ -67,6 +69,7 @@ name: dphys-swapfile state: restarted + - name: Install RPi rootfs resizing (/usr/sbin/iiab-rpi-max-rootfs.sh) and its systemd service (/etc/systemd/system/iiab-rpi-root-resize.service), from templates (root:root by default) template: src: "{{ item.src }}" diff --git a/roles/2-common/tasks/main.yml b/roles/2-common/tasks/main.yml index 0693fd50e..a89928992 100644 --- a/roles/2-common/tasks/main.yml +++ b/roles/2-common/tasks/main.yml @@ -13,6 +13,7 @@ - include_tasks: iiab-startup.yml + # UNMAINTAINED #- include_tasks: centos.yml # when: ansible_distribution == "CentOS" @@ -39,6 +40,7 @@ # dest: /etc/profile.d/zzz_iiab.sh # src: zzz_iiab.sh + - name: Recording STAGE 2 HAS COMPLETED ========================== lineinfile: path: "{{ iiab_env_file }}" diff --git a/roles/4-server-options/tasks/main.yml b/roles/4-server-options/tasks/main.yml index faa5ce574..52c177384 100644 --- a/roles/4-server-options/tasks/main.yml +++ b/roles/4-server-options/tasks/main.yml @@ -23,6 +23,7 @@ name: sshd when: sshd_install + # UNMAINTAINED - name: Install named / BIND include_tasks: roles/network/tasks/named.yml @@ -38,6 +39,7 @@ include_tasks: roles/network/tasks/squid.yml when: squid_install is defined and squid_install + - name: Install Bluetooth - only on Raspberry Pi include_role: name: bluetooth @@ -69,6 +71,7 @@ name: www_options #when: www_options_install # Flag might be created in future? + - name: Recording STAGE 4 HAS COMPLETED ================== lineinfile: path: "{{ iiab_env_file }}"