diff --git a/roles/gitea/defaults/main.yml b/roles/gitea/defaults/main.yml index 8eccf4881..345b44f35 100644 --- a/roles/gitea/defaults/main.yml +++ b/roles/gitea/defaults/main.yml @@ -8,7 +8,7 @@ # https://git.coolaj86.com/coolaj86/gitea-installer.sh # Information needed to install Gitea -gitea_version: 1.8.0 +gitea_version: 1.8.1 iset_suffixes: i386: 386 x86_64: amd64 diff --git a/roles/nextcloud/defaults/main.yml b/roles/nextcloud/defaults/main.yml index d2ff224ec..38392bbb5 100644 --- a/roles/nextcloud/defaults/main.yml +++ b/roles/nextcloud/defaults/main.yml @@ -11,7 +11,11 @@ nextcloud_url: /nextcloud nextcloud_prefix: /opt nextcloud_data_dir: "{{ content_base }}/nextcloud/data" nextcloud_dl_url: https://download.nextcloud.com/server/releases -nextcloud_orig_src_file: latest-15.tar.bz2 # 2019-04-24: nextcloud-16.0.0.tar.bz2 requires PHP 7.1+ and so fails on current Raspbian 9 and Debian 9 "Stretch". 2019-05-11: latest-16.tar.bz2 finally published to https://download.nextcloud.com/server/releases/ (nextcloud/server#15502) e.g. for Ubuntu 18.04+ + +# 2019-05-11: latest-16.tar.bz2 finally published to https://download.nextcloud.com/server/releases/ (nextcloud/server#15502) e.g. for Ubuntu 18.04 & Debian 10 +nextcloud_orig_src_file_old: latest-15.tar.bz2 # 2019-05-16: for legacy OS's Debian 9 & Raspbian 9 where PHP 7.1+ isn't available +nextcloud_src_file_old: nextcloud_{{ nextcloud_orig_src_file_old }} +nextcloud_orig_src_file: latest-16.tar.bz2 # 2019-05-16: for all other OS's e.g. Debian 10 & Ubuntu 18.04 where PHP 7.1+ is hopefully available! nextcloud_src_file: nextcloud_{{ nextcloud_orig_src_file }} # we install on mysql with these setting or those from default_vars, etc. diff --git a/roles/nextcloud/tasks/main.yml b/roles/nextcloud/tasks/main.yml index b7eb5f2f7..d3d96a578 100644 --- a/roles/nextcloud/tasks/main.yml +++ b/roles/nextcloud/tasks/main.yml @@ -14,7 +14,21 @@ # - debug: # msg: "nextcloud_force_install: {{ nextcloud_force_install }}" -- name: Download {{ nextcloud_dl_url }}/{{ nextcloud_orig_src_file }} to {{ downloads_dir }}/{{ nextcloud_src_file }} +- name: Download {{ nextcloud_dl_url }}/{{ nextcloud_orig_src_file_old }} to {{ downloads_dir }}/{{ nextcloud_src_file_old }} on older OS's lacking PHP 7.1+ + get_url: + url: "{{ nextcloud_dl_url }}/{{ nextcloud_orig_src_file_old }}" + dest: "{{ downloads_dir }}/{{ nextcloud_src_file_old }}" + timeout: "{{ download_timeout }}" + force: yes + #validate_certs: False # TEMPORARY ON/AFTER 2018-07-22 AS download.nextcloud.com CERT EXPIRED: https://github.com/iiab/iiab/issues/954 + when: internet_available and nextcloud_force_install + #async: 1800 + #poll: 10 + tags: + - download + when: is_debian_9 or is_raspbian_9 + +- name: Download {{ nextcloud_dl_url }}/{{ nextcloud_orig_src_file }} to {{ downloads_dir }}/{{ nextcloud_src_file }} on newer OS's that have PHP 7.1+ get_url: url: "{{ nextcloud_dl_url }}/{{ nextcloud_orig_src_file }}" dest: "{{ downloads_dir }}/{{ nextcloud_src_file }}" @@ -26,6 +40,7 @@ #poll: 10 tags: - download + when: not (is_debian_9 or is_raspbian_9) # Ubuntu and Debian treat names differently - name: Install 3 php packages (debian) @@ -85,12 +100,19 @@ state: present when: is_redhat -- name: Unarchive {{ nextcloud_src_file }} to permanent location {{ nextcloud_prefix }}/nextcloud # e.g. unpack nextcloud_latest-14.tar.bz2 to /opt/nextcloud +- name: Unarchive {{ nextcloud_src_file_old }} to permanent location {{ nextcloud_prefix }}/nextcloud on older OS's lacking PHP 7.1+ # e.g. unpack nextcloud_latest-15.tar.bz2 to /opt/nextcloud + unarchive: + src: "{{ downloads_dir }}/{{ nextcloud_src_file_old }}" + dest: "{{ nextcloud_prefix }}" + #creates: "{{ nextcloud_prefix }}/nextcloud/version.php" + when: nextcloud_force_install and (is_debian_9 or is_raspbian_9) + +- name: Unarchive {{ nextcloud_src_file }} to permanent location {{ nextcloud_prefix }}/nextcloud on newer OS's that have PHP 7.1+ # e.g. unpack nextcloud_latest-16.tar.bz2 to /opt/nextcloud unarchive: src: "{{ downloads_dir }}/{{ nextcloud_src_file }}" dest: "{{ nextcloud_prefix }}" #creates: "{{ nextcloud_prefix }}/nextcloud/version.php" - when: nextcloud_force_install + when: nextcloud_force_install and not (is_debian_9 or is_raspbian_9) - name: Create dir /etc/nextcloud (centos) for a subsequent config dir that's symlinked to /etc/nextcloud ? file: diff --git a/roles/openvpn/templates/iiab-support b/roles/openvpn/templates/iiab-support index 35a5ae4f9..fe294bb38 100644 --- a/roles/openvpn/templates/iiab-support +++ b/roles/openvpn/templates/iiab-support @@ -2,7 +2,7 @@ # openvpn_handle is stored in 2 files on disk, one slightly stripped down (from # the other) due to Ansible. So we emulate Ansible's behavior, when reading from -# (and later writing to) disk, removing outer cruft as explained on Lines 27-29 +# (and later writing to) disk, removing outer cruft as explained on Lines 27-29: handle1=$(grep "^openvpn_handle:" /etc/iiab/local_vars.yml | sed -e "s/^openvpn_handle://; s/^\s*//; s/\s*$//; s/^\(['\"]\)\(.*\)\1$/\2/") echo -e "\n/etc/iiab/local_vars.yml source/master copy: $handle1" if [ -f /etc/iiab/openvpn_handle ]; then @@ -12,7 +12,11 @@ else echo -e "/etc/iiab/openvpn_handle for openvpn daemon: [FILE DOESN'T YET EXIST]\n" fi -echo -en "\e[1mPlease type a descriptive OpenVPN machine name (openvpn_handle) such as:\n\n cape-town-school-36-rpi-2019-05-31\n\nOr hit [Enter] to keep the existing name:\e[0m " +echo -e "\e[1mPlease type a descriptive OpenVPN machine name (openvpn_handle) such as:\n" + +echo -e " cape-town-school-36-rpi-2019-05-31\n" + +echo -en "Or hit [Enter] to keep the existing name:\e[0m " read ans < /dev/tty #if [ "$ans" != "" ] || ( [ "$handle1" = "" ] && [ ! -f /etc/iiab/openvpn_handle ] ); then @@ -26,7 +30,7 @@ if [ "$ans" != "" ] || ( [ "$handle1" = "" ] && [ ! -v handle2 ] ); then # BEHAVIOR JUST LIKE ANSIBLE'S: create /etc/iiab/openvpn_handle from the # "^openvpn_handle:" line in /etc/iiab/local_vars.yml by (1) removing outer - # spacing IF NEC, then (2) removing 1 pair of matching outer quotes IF NEC. + # spacing IF NEC, then (2) removing 1 pair of matching outer quotes IF NEC: ans=$(echo $ans | sed -e "s/^\s*//; s/\s*$//; s/^\(['\"]\)\(.*\)\1$/\2/") echo $ans > /etc/iiab/openvpn_handle echo -e "\n\e[1mSAVED: openvpn_handle recorded into both above files.\e[0m\n" @@ -73,10 +77,12 @@ for i in {40..16} ; do echo -en "\e[48;5;${i}m \e[0m" ; done echo -e "\n\n 1. Check your Internet connection: run 'ping 8.8.8.8' and 'ping mit.edu'" echo -e " 2. Check your OpenVPN connection: run 'ping 10.8.0.1'" echo -e " 3. Run 'ip a' and look for a 'tun0' IP address like 10.8.0.x" -echo -e " 4. If necessary, run 'systemctl restart openvpn' which will" -echo -e " effectively run 'systemctl restart openvpn@xscenet' for you." +echo -e " 4. If necessary, run 'systemctl restart openvpn' which should" +echo -e " run 'systemctl restart openvpn@xscenet' for you." echo -e " 5. Sometimes waiting a minute helps -- retry steps 2 and 3 to monitor." -echo -e " 6. Read 'How can I remotely manage my Internet-in-a-Box?' at" +echo -e " 6. If in future you want to disable OpenVPN connections to-and-from your" +echo -e " Internet-in-a-Box (IIAB) please run 'iiab-support-off' at that time." +echo -e " 7. Read 'How can I remotely manage my Internet-in-a-Box?' at" echo -e " http://FAQ.IIAB.IO to learn about DIY remote support alternatives" echo -e " like ngrok, serveo, remot3.it and TeamViewer.\n" @@ -86,7 +92,6 @@ echo -en " OpenVPN TIPS " for i in {40..16} ; do echo -en "\e[48;5;${i}m \e[0m" ; done echo -e "\n\nNow let's wait 15 seconds, as OpenVPN handshake sometimes needs that (or more!)" - sleep 15 echo -en "\nYour OpenVPN machine name (openvpn_handle) is: \e[32m" diff --git a/scripts/ansible b/scripts/ansible index 5896773b6..5f222555d 100755 --- a/scripts/ansible +++ b/scripts/ansible @@ -1,7 +1,7 @@ #!/bin/bash -e CURR_VER="undefined" # Ansible version you currently have installed -GOOD_VER="2.7.10" # For XO laptops (pip install) & CentOS (yum install rpm) +GOOD_VER="2.8.0" # For XO laptops (pip install) & CentOS (yum install rpm) # On other OS's we attempt the latest from PPA, which might be more recent export DEBIAN_FRONTEND=noninteractive diff --git a/vars/local_vars_big.yml b/vars/local_vars_big.yml index 844dfb909..587d40713 100644 --- a/vars/local_vars_big.yml +++ b/vars/local_vars_big.yml @@ -296,8 +296,8 @@ calibre_web_path: calibre #NEEDS WORK: https://github.com/iiab/iiab/issues/529 # program, so we recommend you also install Calibre (above!) # Calibre-Web alternative to Calibre, offers a clean/modern UX -calibreweb_install: False -calibreweb_enabled: False +calibreweb_install: True +calibreweb_enabled: True calibreweb_port: 8083 # PORT VARIABLE HAS NO EFFECT (as of January 2019) # http://box/books works. Add {box/libros, box/livres, box/livros, box/liv} etc? calibreweb_url: /books diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index ee49de897..583df4276 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -296,8 +296,8 @@ calibre_web_path: calibre #NEEDS WORK: https://github.com/iiab/iiab/issues/529 # program, so we recommend you also install Calibre (above!) # Calibre-Web alternative to Calibre, offers a clean/modern UX -calibreweb_install: False -calibreweb_enabled: False +calibreweb_install: True +calibreweb_enabled: True calibreweb_port: 8083 # PORT VARIABLE HAS NO EFFECT (as of January 2019) # http://box/books works. Add {box/libros, box/livres, box/livros, box/liv} etc? calibreweb_url: /books