From b047356cace8d962014934f0f62592e789d16cba Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 27 Jul 2021 08:24:31 -0400 Subject: [PATCH 1/6] Update packages.yml --- roles/2-common/tasks/packages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/2-common/tasks/packages.yml b/roles/2-common/tasks/packages.yml index 2b34df393..cb9bce7de 100644 --- a/roles/2-common/tasks/packages.yml +++ b/roles/2-common/tasks/packages.yml @@ -27,7 +27,7 @@ state: present when: is_debuntu -- name: "Install 19 common packages: acpid, bzip2, curl, gawk, htop, i2c-tools, logrotate, make, mlocate, net-tools, ntfs-3g, pandoc, pastebinit, rsync, sqlite3, tar, unzip, usbutils, wget" +- name: "Install 18 common packages: acpid, bzip2, curl, gawk, htop, i2c-tools, logrotate, mlocate, net-tools, ntfs-3g, pandoc, pastebinit, rsync, sqlite3, tar, unzip, usbutils, wget" package: name: - acpid # Daemon for ACPI (power mgmt) events @@ -40,7 +40,7 @@ #- iproute2 # Installed by roles/2-common/tasks/network.yml - logrotate #- lynx # Installed by 1-prep's roles/iiab-admin/tasks/access.yml - - make # 2021-04-26: What roles (if any) truly still use this? + #- make # 2021-04-26: What roles (if any) truly still use this? - mlocate - net-tools # 2021-04-26: @jvonau suggests possibly deleting this...unless oldtimers really want these older commands in iiab-diagnostics output? - ntfs-3g # Possibly no longer nec, similar to exfat packages above? From 750789b580a35ffa8a20ac06ddf6d1a622790297 Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 27 Jul 2021 08:41:22 -0400 Subject: [PATCH 2/6] pbx/tasks/main.yml: Install 'make' & cleaner code --- roles/pbx/tasks/install.yml | 51 ++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/roles/pbx/tasks/install.yml b/roles/pbx/tasks/install.yml index 7a6c41364..e96b6ccd4 100644 --- a/roles/pbx/tasks/install.yml +++ b/roles/pbx/tasks/install.yml @@ -1,3 +1,12 @@ +- debug: # Crazy spacing below is tuned for 80-column screens + msg: >- + ####################################################################WARNING: + ONLY UBUNTU 18.04, DEBIAN 9 & RASPBIAN ARE SUPPORTED AS OF FEB 2019. Please + assist Internet-in-a-Box communities worldwide if you can make + Asterisk and FreePBX work on other OS's / distros, Thank + You! http://FAQ.IIAB.IO ############################################################################### + + - name: "Set 'nodejs_install: True' and 'nodejs_enabled: True'" set_fact: nodejs_install: True @@ -17,6 +26,7 @@ # msg: "PBX install cannot proceed, as it currently requires Node.js 12.x, whereas nodejs_version is set to {{ nodejs_version }}. Please check the value of nodejs_version in /opt/iiab/iiab/vars/default_vars.yml, /etc/iiab/local_vars.yml, /opt/iiab/iiab/roles/nodejs, etc." # when: nodejs_version != "12.x" + - name: "Set 'apache_install: True' and 'apache_enabled: True'" set_fact: apache_install: True @@ -26,34 +36,33 @@ include_role: name: httpd + +# 2021-07-27: taken care of by main.yml #- name: TODO: Check if asterisk and freepbx are already installed +# +#- name: Check if /etc/systemd/system/freepbx.service is already installed +# stat: +# path: /etc/systemd/system/freepbx.service +# register: freepbx_installed +# +#- debug: +# msg: >- +# FreePBX already installed. Reinstall shall be skipped +# when: freepbx_installed.stat.exists -- debug: # Crazy spacing below is tuned for 80-column screens - msg: >- - ####################################################################WARNING: - ONLY UBUNTU 18.04, DEBIAN 9 & RASPBIAN ARE SUPPORTED AS OF FEB 2019. Please - assist Internet-in-a-Box communities worldwide if you can make - Asterisk and FreePBX work on other OS's / distros, Thank - You! http://FAQ.IIAB.IO ############################################################################### +- name: Install 'make' package + package: + name: make + state: present -- name: Check if /etc/systemd/system/freepbx.service is already installed - stat: - path: /etc/systemd/system/freepbx.service - register: freepbx_installed - -- debug: - msg: >- - FreePBX already installed. Reinstall shall be skipped - when: freepbx_installed.stat.exists - -- name: Install Asterisk (debuntu) +- name: Install Asterisk include_tasks: asterisk.yml - when: internet_available and pbx_install and (pbx_installed is undefined) and is_debuntu and (not freepbx_installed.stat.exists) + #when: internet_available and pbx_install and (pbx_installed is undefined) and is_debuntu and (not freepbx_installed.stat.exists) #when: internet_available and pbx_install and (not pbx_installed) and ((is_debian and ansible_distribution_major_version == "9") or is_ubuntu_18) -- name: Install FreePBX (debuntu) +- name: Install FreePBX include_tasks: freepbx.yml - when: internet_available and pbx_install and (pbx_installed is undefined) and is_debuntu and (not freepbx_installed.stat.exists) + #when: internet_available and pbx_install and (pbx_installed is undefined) and is_debuntu and (not freepbx_installed.stat.exists) #when: internet_available and pbx_install and (not pbx_installed) and ((is_debian and ansible_distribution_major_version == "9") or is_ubuntu_18) From 146929a750b9e543c5f40505c693302564a713da Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 27 Jul 2021 09:17:39 -0400 Subject: [PATCH 3/6] Update packages.yml --- roles/2-common/tasks/packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/2-common/tasks/packages.yml b/roles/2-common/tasks/packages.yml index cb9bce7de..a844e6c0b 100644 --- a/roles/2-common/tasks/packages.yml +++ b/roles/2-common/tasks/packages.yml @@ -40,7 +40,7 @@ #- iproute2 # Installed by roles/2-common/tasks/network.yml - logrotate #- lynx # Installed by 1-prep's roles/iiab-admin/tasks/access.yml - #- make # 2021-04-26: What roles (if any) truly still use this? + #- make # 2021-07-27: Currently used by roles/pbx and no other roles - mlocate - net-tools # 2021-04-26: @jvonau suggests possibly deleting this...unless oldtimers really want these older commands in iiab-diagnostics output? - ntfs-3g # Possibly no longer nec, similar to exfat packages above? From 299adb17da3d8bb3e97f7cb87276c23b5f90984c Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 27 Jul 2021 09:50:27 -0400 Subject: [PATCH 4/6] iiab-diagnostics: dpkg --print-architecture && dpkg --print-foreign-architectures --- scripts/iiab-diagnostics | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/iiab-diagnostics b/scripts/iiab-diagnostics index 35b4965b2..98dc21c48 100755 --- a/scripts/iiab-diagnostics +++ b/scripts/iiab-diagnostics @@ -182,6 +182,8 @@ echo -e "\n\n\n\n\n4. OUTPUT OF COMMANDS\n" >> $outfile cat_cmd 'uname -a' 'Linux kernel' cat_cmd 'free' 'RAM memory' cat_cmd 'lscpu' 'CPU details' +cat_cmd 'dpkg --print-architecture' 'RaspiOS on PC shows: i386' +cat_cmd 'dpkg --print-foreign-architectures' 'RaspiOS on PC shows: amd64' cat_cmd 'df -h' 'Disk usage' cat_cmd 'lsblk' 'Partition mount points' cat_cmd 'blkid' 'Mount point details' From 8b1c7321df0f0b779c00cd265d3d43a3c043c784 Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 27 Jul 2021 10:12:58 -0400 Subject: [PATCH 5/6] iiab-diagnostics: Show CPU arch(es) near the top --- scripts/iiab-diagnostics | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/iiab-diagnostics b/scripts/iiab-diagnostics index 98dc21c48..fbbca15a9 100755 --- a/scripts/iiab-diagnostics +++ b/scripts/iiab-diagnostics @@ -131,6 +131,8 @@ fi echo >> $outfile cat_file /etc/issue.net cat_file /etc/debian_version +cat_cmd 'dpkg --print-architecture' 'RaspiOS-on-PC shows: i386' +cat_cmd 'dpkg --print-foreign-architectures' 'RaspiOS-on-PC shows: amd64' echo -e '\n\n 1. Files Specially Requested: (from "iiab-diagnostics PATH/FILE1 PATH/FILE2")\n' echo -e '\n\n\n\n1. FILES SPECIALLY REQUESTED (FROM "iiab-diagnostics PATH/FILE1 PATH/FILE2")\n' >> $outfile @@ -182,8 +184,6 @@ echo -e "\n\n\n\n\n4. OUTPUT OF COMMANDS\n" >> $outfile cat_cmd 'uname -a' 'Linux kernel' cat_cmd 'free' 'RAM memory' cat_cmd 'lscpu' 'CPU details' -cat_cmd 'dpkg --print-architecture' 'RaspiOS on PC shows: i386' -cat_cmd 'dpkg --print-foreign-architectures' 'RaspiOS on PC shows: amd64' cat_cmd 'df -h' 'Disk usage' cat_cmd 'lsblk' 'Partition mount points' cat_cmd 'blkid' 'Mount point details' From bb37d0cfb0d5e6756730a05b565fbb6e7612be38 Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 27 Jul 2021 11:39:22 -0400 Subject: [PATCH 6/6] kalite/tasks/install.yml: Clarifying comment --- roles/kalite/tasks/install.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/kalite/tasks/install.yml b/roles/kalite/tasks/install.yml index a03208fd2..ab6a923a8 100644 --- a/roles/kalite/tasks/install.yml +++ b/roles/kalite/tasks/install.yml @@ -89,6 +89,8 @@ poll: 10 +# RECORD KA Lite AS INSTALLED + - name: "Set 'kalite_installed: True'" set_fact: kalite_installed: True