mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
commit
ac465d00a2
98 changed files with 168 additions and 188 deletions
|
@ -41,6 +41,7 @@ else
|
||||||
echo -e "\nPlease run: ./iiab-install"
|
echo -e "\nPlease run: ./iiab-install"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
cp ./scripts/local_facts.fact /etc/ansible/facts.d/local_facts.fact
|
||||||
|
|
||||||
# Workaround for (web-published) images; will go away later
|
# Workaround for (web-published) images; will go away later
|
||||||
if grep -q sugar $IIAB_STATE_FILE && ! grep -q mongodb $IIAB_STATE_FILE; then
|
if grep -q sugar $IIAB_STATE_FILE && ! grep -q mongodb $IIAB_STATE_FILE; then
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
- name: Install nodogsplash (Raspbian only)
|
- name: Install nodogsplash (Raspbian only)
|
||||||
include_tasks: rpi.yml
|
include_tasks: rpi.yml
|
||||||
when: is_rpi | bool
|
when: is_raspbian | bool
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
# These are defaults for boolean routines.
|
# These are defaults for boolean routines.
|
||||||
first_run: False
|
first_run: False
|
||||||
rpi_model: none
|
rpi_model: none
|
||||||
is_rpi: False
|
|
||||||
xo_model: none
|
xo_model: none
|
||||||
gw_active: False
|
gw_active: False
|
||||||
internet_available: False
|
internet_available: False
|
||||||
|
|
|
@ -37,3 +37,5 @@
|
||||||
value: "{{ ansible_date_time.iso8601 }}"
|
value: "{{ ansible_date_time.iso8601 }}"
|
||||||
- option: install_xo
|
- option: install_xo
|
||||||
value: "{{ xo_model }}"
|
value: "{{ xo_model }}"
|
||||||
|
- option: is_rpi
|
||||||
|
value: "{{ rpi_model }}"
|
||||||
|
|
|
@ -9,6 +9,13 @@
|
||||||
first_run: True
|
first_run: True
|
||||||
when: not NewInstall.stat.exists
|
when: not NewInstall.stat.exists
|
||||||
|
|
||||||
|
- name: Set top-level variables from local_facts for convenience
|
||||||
|
set_fact:
|
||||||
|
rpi_model: "{{ ansible_local.local_facts.rpi_model }}"
|
||||||
|
xo_model: "{{ ansible_local.local_facts.xo_model }}"
|
||||||
|
phplib_dir: "{{ ansible_local.local_facts.phplib_dir }}"
|
||||||
|
iiab_stage: "{{ ansible_local.local_facts.stage }}"
|
||||||
|
|
||||||
# We need to inialize the ini file and only write the location and version
|
# We need to inialize the ini file and only write the location and version
|
||||||
# sections once and only once to preserve the install date and git hash.
|
# sections once and only once to preserve the install date and git hash.
|
||||||
- name: Create IIAB tools and {{ iiab_ini_file }}, if first_run
|
- name: Create IIAB tools and {{ iiab_ini_file }}, if first_run
|
||||||
|
@ -55,20 +62,6 @@
|
||||||
# fail_msg: "PLEASE CONFIRM 'apache_install: True' AND 'apache_enable: True' IF 'nginx_enabled: False' e.g. IN: /etc/iiab/local_vars.yml"
|
# fail_msg: "PLEASE CONFIRM 'apache_install: True' AND 'apache_enable: True' IF 'nginx_enabled: False' e.g. IN: /etc/iiab/local_vars.yml"
|
||||||
# quiet: yes
|
# quiet: yes
|
||||||
|
|
||||||
- name: Set top-level variables from local_facts for convenience
|
|
||||||
set_fact:
|
|
||||||
xo_model: "{{ ansible_local.local_facts.xo_model }}"
|
|
||||||
phplib_dir: "{{ ansible_local.local_facts.phplib_dir }}"
|
|
||||||
iiab_stage: "{{ ansible_local.local_facts.stage }}"
|
|
||||||
|
|
||||||
- name: Discover if this is running Raspbian -- if so assume it is an RPi
|
|
||||||
set_fact:
|
|
||||||
rpi_model: "rpi"
|
|
||||||
is_rpi: True
|
|
||||||
#no_net_restart: True
|
|
||||||
#nobridge: True
|
|
||||||
when: ansible_local.local_facts.os == "raspbian"
|
|
||||||
|
|
||||||
- name: Set exFAT_enabled if xo_model != "none"
|
- name: Set exFAT_enabled if xo_model != "none"
|
||||||
set_fact:
|
set_fact:
|
||||||
exFAT_enabled: True
|
exFAT_enabled: True
|
||||||
|
@ -217,7 +210,7 @@
|
||||||
- option: internet_available
|
- option: internet_available
|
||||||
value: "{{ internet_available }}"
|
value: "{{ internet_available }}"
|
||||||
- option: is_rpi
|
- option: is_rpi
|
||||||
value: "{{ is_rpi }}"
|
value: "{{ rpi_model }}"
|
||||||
- option: first_run
|
- option: first_run
|
||||||
value: "{{ first_run }}"
|
value: "{{ first_run }}"
|
||||||
- option: local_tz
|
- option: local_tz
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
path: /etc/dphys-swapfile
|
path: /etc/dphys-swapfile
|
||||||
regexp: "^CONF_SWAPSIZE"
|
regexp: "^CONF_SWAPSIZE"
|
||||||
line: "CONF_SWAPSIZE={{ pi_swap_file_size }}"
|
line: "CONF_SWAPSIZE={{ pi_swap_file_size }}"
|
||||||
when: is_debuntu | bool # Redundant, given raspberry_pi.yml is only run when rpi_model: "rpi" (similar to is_rpi: True). Until someone tries a non-debuntu OS on RPi?
|
when: is_debuntu | bool # Redundant, given raspberry_pi.yml is only run when rpi_model: != "none" Until someone tries a non-debuntu OS on RPi?
|
||||||
|
|
||||||
- name: Restart swap service "dphys-swapfile" (debuntu)
|
- name: Restart swap service "dphys-swapfile" (debuntu)
|
||||||
#command: /etc/init.d/dphys-swapfile restart
|
#command: /etc/init.d/dphys-swapfile restart
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
apt:
|
apt:
|
||||||
deb: "{{ iiab_download_url }}/usbmount_0.0.14.1_all.deb"
|
deb: "{{ iiab_download_url }}/usbmount_0.0.14.1_all.deb"
|
||||||
#timeout: "{{ download_timeout }}" # Ansible's apt module doesn't support timeout parameter; that's ok as usbmount_0.0.14.1_all.deb is only 10KB
|
#timeout: "{{ download_timeout }}" # Ansible's apt module doesn't support timeout parameter; that's ok as usbmount_0.0.14.1_all.deb is only 10KB
|
||||||
when: internet_available and (is_debian_9 or is_debian_10) and not is_rpi
|
when: internet_available and (is_debian_9 or is_debian_10) and not is_raspbian
|
||||||
|
|
||||||
- name: "Install 6 deb/apt packages: avahi-daemon, exfat-fuse, exfat-utils, inetutils-syslogd, libnss-mdns, wpasupplicant (debuntu)"
|
- name: "Install 6 deb/apt packages: avahi-daemon, exfat-fuse, exfat-utils, inetutils-syslogd, libnss-mdns, wpasupplicant (debuntu)"
|
||||||
package:
|
package:
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
name: mysql
|
name: mysql
|
||||||
when: mysql_install | bool
|
when: mysql_install | bool
|
||||||
|
|
||||||
- name: WWW_BACK_END (WWW_FRONT_END should be installed later)
|
- name: WWW_BASE (WWW_OPTIONS should be installed later)
|
||||||
include_role:
|
include_role:
|
||||||
name: www_back_end
|
name: www_base
|
||||||
#when: www_back_end_install | bool
|
#when: www_base_install | bool
|
||||||
#when: apache_install or nginx_install
|
#when: apache_install or nginx_install
|
||||||
|
|
||||||
- name: HTTPD (Apache)
|
- name: HTTPD (Apache)
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
- name: Install Bluetooth - only on Raspberry Pi
|
- name: Install Bluetooth - only on Raspberry Pi
|
||||||
include_role:
|
include_role:
|
||||||
name: bluetooth
|
name: bluetooth
|
||||||
when: is_rpi and bluetooth_install
|
when: is_raspbian and bluetooth_install
|
||||||
|
|
||||||
- name: USB_LIB
|
- name: USB_LIB
|
||||||
include_role:
|
include_role:
|
||||||
|
@ -37,15 +37,15 @@
|
||||||
name: samba
|
name: samba
|
||||||
when: samba_install | bool
|
when: samba_install | bool
|
||||||
|
|
||||||
# 2020-02-12: what was roles/homepage lives in roles/www_back_end &
|
# 2020-02-12: what was roles/homepage lives in roles/www_base &
|
||||||
# roles/www_front_end for now. Eventually softcoding of iiab_home_url
|
# roles/www_options for now. Eventually softcoding of iiab_home_url
|
||||||
# should happen everywhere (incl Admin Console) to allow more field
|
# should happen everywhere (incl Admin Console) to allow more field
|
||||||
# options, e.g. changing /library/www/html/home even when offline...
|
# options, e.g. changing /library/www/html/home even when offline...
|
||||||
|
|
||||||
- name: WWW_FRONT_END (WWW_BACK_END should have been installed earlier)
|
- name: WWW_OPTIONS (WWW_BASE should have been installed earlier)
|
||||||
include_role:
|
include_role:
|
||||||
name: www_front_end
|
name: www_options
|
||||||
#when: www_front_end_install | bool
|
#when: www_options_install | bool
|
||||||
#when: apache_install or nginx_install
|
#when: apache_install or nginx_install
|
||||||
|
|
||||||
- name: Recording STAGE 4 HAS COMPLETED ==================
|
- name: Recording STAGE 4 HAS COMPLETED ==================
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
calibreweb_version: 0.6.6 # WAS: master, 0.6.4, 0.6.5
|
calibreweb_version: 0.6.6 # WAS: master, 0.6.4, 0.6.5
|
||||||
|
|
||||||
calibreweb_venv_path: /usr/local/calibre-web
|
calibreweb_venv_path: /usr/local/calibre-web-py3
|
||||||
calibreweb_exec_path: "{{ calibreweb_venv_path }}/cps.py"
|
calibreweb_exec_path: "{{ calibreweb_venv_path }}/cps.py"
|
||||||
|
|
||||||
# Config files put in:
|
# Config files put in:
|
||||||
|
|
|
@ -42,23 +42,14 @@
|
||||||
# ignore_errors: True
|
# ignore_errors: True
|
||||||
##
|
##
|
||||||
# Implementing this with Ansible command module for now.
|
# Implementing this with Ansible command module for now.
|
||||||
- name: Download Calibre-Web dependencies (using pip) into python2.7 virtual environment {{ calibreweb_venv_path }}
|
- name: Download Calibre-Web dependencies (using pip) into python3 virtual environment {{ calibreweb_venv_path }}
|
||||||
pip:
|
pip:
|
||||||
requirements: "{{ calibreweb_venv_path }}/requirements.txt"
|
requirements: "{{ calibreweb_venv_path }}/requirements.txt"
|
||||||
virtualenv: "{{ calibreweb_venv_path }}" # /usr/local/calibre-web
|
virtualenv: "{{ calibreweb_venv_path }}" # /usr/local/calibre-web-py3
|
||||||
virtualenv_site_packages: no
|
virtualenv_site_packages: no
|
||||||
virtualenv_command: /usr/bin/virtualenv
|
virtualenv_command: python3 -m venv {{ calibreweb_venv_path }}
|
||||||
virtualenv_python: python2.7
|
|
||||||
when: internet_available | bool
|
when: internet_available | bool
|
||||||
|
|
||||||
# 2020-02-02: IS PYTHON 3 POSSIBLE ABOVE AND BELOW?
|
|
||||||
|
|
||||||
- name: Symlink {{ calibreweb_venv_path }}/vendor -> {{ calibreweb_venv_path }}/lib/python2.7/site-packages - to keep {{ calibreweb_venv_path }}/cps.py happy
|
|
||||||
file:
|
|
||||||
src: "{{ calibreweb_venv_path }}/lib/python2.7/site-packages"
|
|
||||||
path: "{{ calibreweb_venv_path }}/vendor" # /usr/local/calibre-web
|
|
||||||
state: link
|
|
||||||
|
|
||||||
- name: Install /etc/systemd/system/calibre-web.service from template
|
- name: Install /etc/systemd/system/calibre-web.service from template
|
||||||
template:
|
template:
|
||||||
src: calibre-web.service.j2
|
src: calibre-web.service.j2
|
||||||
|
|
|
@ -3,7 +3,7 @@ Description=Calibre-Web
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User={{ calibreweb_user }}
|
User={{ calibreweb_user }}
|
||||||
ExecStart={{ calibreweb_exec_path }} -p {{ calibreweb_config }}/{{ calibreweb_settings_database }}
|
ExecStart={{ calibreweb_venv_path }}/bin/python3 {{ calibreweb_exec_path }} -p {{ calibreweb_config }}/{{ calibreweb_settings_database }}
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
|
@ -21,16 +21,16 @@
|
||||||
|
|
||||||
#- name: Install packages that Raspbian .deb's had installed for Calibre 3.23 (rpi)
|
#- name: Install packages that Raspbian .deb's had installed for Calibre 3.23 (rpi)
|
||||||
# command: scripts/calibre-install-packages.sh # BORROWED package list from /var/log/apt/history.log (that resulted from 2018-05-22 install of Calibre 3.23 using calibre-install-latest-rpi.sh).
|
# command: scripts/calibre-install-packages.sh # BORROWED package list from /var/log/apt/history.log (that resulted from 2018-05-22 install of Calibre 3.23 using calibre-install-latest-rpi.sh).
|
||||||
# when: is_rpi and internet_available
|
# when: is_raspbian and internet_available
|
||||||
|
|
||||||
#- name: Upgrade to latest Calibre using Debian's own .deb's from testing (rpi)
|
#- name: Upgrade to latest Calibre using Debian's own .deb's from testing (rpi)
|
||||||
# command: scripts/calibre-install-latest.sh # WAS NEC with Calibre 3.24+ & Calibre 3.29 on 2018-08-21 (PR #1015), as all above strategies failed (only script that was not attempted: Sid-like calibre-install-unstable.sh). CLARIF: RESULTING microSD's ARE NOT BOOTABLE IN Zero W (#952) due to libc6 or similar.e.g. if calibre-install-packages.sh isn't run above?
|
# command: scripts/calibre-install-latest.sh # WAS NEC with Calibre 3.24+ & Calibre 3.29 on 2018-08-21 (PR #1015), as all above strategies failed (only script that was not attempted: Sid-like calibre-install-unstable.sh). CLARIF: RESULTING microSD's ARE NOT BOOTABLE IN Zero W (#952) due to libc6 or similar.e.g. if calibre-install-packages.sh isn't run above?
|
||||||
# #command: scripts/calibre-install-latest-rpi-plus.sh # WORKED for Calibre 3.27.1 on 2018-07-22 (#948 -> PR #950) THO NOT BOOTABLE IN Zero W (#952). Similar to Calibre 3.24.x & 3.25 in June 2018, which had used calibre-install-packages.sh then Debian's own calibre-install-latest.sh
|
# #command: scripts/calibre-install-latest-rpi-plus.sh # WORKED for Calibre 3.27.1 on 2018-07-22 (#948 -> PR #950) THO NOT BOOTABLE IN Zero W (#952). Similar to Calibre 3.24.x & 3.25 in June 2018, which had used calibre-install-packages.sh then Debian's own calibre-install-latest.sh
|
||||||
# when: is_rpi and internet_available
|
# when: is_raspbian and internet_available
|
||||||
|
|
||||||
- name: Upgrade to latest Calibre using .deb's from testing (rpi)
|
- name: Upgrade to latest Calibre using .deb's from testing (rpi)
|
||||||
command: scripts/calibre-install-latest-rpi.sh # WORKED for Calibre 3.33.1 on 2018-10-23. And Calibre 3.28 on 2018-07-26 (PR #971). Likewise for Calibre 3.26.x. FAILED with Calibre 3.24+ ("calibre : Depends: python-pyqt5 (>= 5.10.1+dfsg-2) but 5.10.1+dfsg-1+rpi1 is to be installed") since June 2018.
|
command: scripts/calibre-install-latest-rpi.sh # WORKED for Calibre 3.33.1 on 2018-10-23. And Calibre 3.28 on 2018-07-26 (PR #971). Likewise for Calibre 3.26.x. FAILED with Calibre 3.24+ ("calibre : Depends: python-pyqt5 (>= 5.10.1+dfsg-2) but 5.10.1+dfsg-1+rpi1 is to be installed") since June 2018.
|
||||||
when: is_rpi and internet_available
|
when: is_raspbian and internet_available
|
||||||
|
|
||||||
#- name: Download PINNED version {{ calibre_deb_pin_version }} of calibre & calibre-bin (rpi)
|
#- name: Download PINNED version {{ calibre_deb_pin_version }} of calibre & calibre-bin (rpi)
|
||||||
# get_url:
|
# get_url:
|
||||||
|
@ -41,17 +41,17 @@
|
||||||
# with_items:
|
# with_items:
|
||||||
# - calibre_{{ calibre_deb_pin_version }}_all.deb
|
# - calibre_{{ calibre_deb_pin_version }}_all.deb
|
||||||
# - calibre-bin_{{ calibre_bin_deb_pin_version }}_armhf.deb
|
# - calibre-bin_{{ calibre_bin_deb_pin_version }}_armhf.deb
|
||||||
# when: is_rpi and internet_available
|
# when: is_raspbian and internet_available
|
||||||
#
|
#
|
||||||
#- name: Install/Upgrade both, to PINNED version {{ calibre_deb_pin_version }} using additional .deb's from testing (rpi)
|
#- name: Install/Upgrade both, to PINNED version {{ calibre_deb_pin_version }} using additional .deb's from testing (rpi)
|
||||||
# command: scripts/calibre-install-pinned-rpi.sh # Worked for Calibre 3.33.1 on 2018-10-23, e.g. so IIAB microSD bootable in RPi Zero W
|
# command: scripts/calibre-install-pinned-rpi.sh # Worked for Calibre 3.33.1 on 2018-10-23, e.g. so IIAB microSD bootable in RPi Zero W
|
||||||
# when: is_rpi and internet_available
|
# when: is_raspbian and internet_available
|
||||||
|
|
||||||
- name: Install/Upgrade to Calibre testing .deb's (not rpi)
|
- name: Install/Upgrade to Calibre testing .deb's (not rpi)
|
||||||
command: scripts/calibre-install-latest.sh
|
command: scripts/calibre-install-latest.sh
|
||||||
when: (not is_rpi) and internet_available
|
when: (not is_raspbian) and internet_available
|
||||||
#when: (not is_rpi) and (is_debian_9 or is_ubuntu_16) and internet_available
|
#when: (not is_raspbian) and (is_debian_9 or is_ubuntu_16) and internet_available
|
||||||
#when: not is_rpi and not is_ubuntu_18 and internet_available
|
#when: not is_raspbian and not is_ubuntu_18 and internet_available
|
||||||
|
|
||||||
- name: Install/Upgrade to Calibre unstable .deb's IF calibre_unstable_debs
|
- name: Install/Upgrade to Calibre unstable .deb's IF calibre_unstable_debs
|
||||||
command: scripts/calibre-install-unstable.sh
|
command: scripts/calibre-install-unstable.sh
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
- calibre
|
- calibre
|
||||||
- calibre-bin
|
- calibre-bin
|
||||||
state: latest
|
state: latest
|
||||||
when: internet_available and not is_rpi and (not calib_executable.stat.exists)
|
when: internet_available and not is_raspbian and (not calib_executable.stat.exists)
|
||||||
|
|
||||||
- name: Install Calibre .debs IF calibre_via_debs (AND /usr/bin/calibre WAS MISSING)
|
- name: Install Calibre .debs IF calibre_via_debs (AND /usr/bin/calibre WAS MISSING)
|
||||||
include_tasks: debs.yml
|
include_tasks: debs.yml
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
# Info needed to install Gitea:
|
# Info needed to install Gitea:
|
||||||
|
|
||||||
gitea_version: 1.11.1
|
gitea_version: 1.11.2
|
||||||
iset_suffixes:
|
iset_suffixes:
|
||||||
i386: 386
|
i386: 386
|
||||||
x86_64: amd64
|
x86_64: amd64
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Both invoked in 4-SERVER-OPTIONS, by roles/www_front_end/tasks/main.yml:
|
# Both invoked in 4-SERVER-OPTIONS, by roles/www_options/tasks/main.yml:
|
||||||
#
|
#
|
||||||
# httpd/tasks/homepage.yml
|
# httpd/tasks/homepage.yml
|
||||||
# nginx/tasks/homepage.yml
|
# nginx/tasks/homepage.yml
|
||||||
|
|
|
@ -157,7 +157,7 @@
|
||||||
# when: not apache_enabled
|
# when: not apache_enabled
|
||||||
|
|
||||||
- debug:
|
- debug:
|
||||||
msg: roles/httpd/tasks/homepage.yml will run LATER (invoked by roles/www_front_end/tasks/main.yml) SO THAT APACHE CAN REDIRECT http://box TO http://box{{ iiab_home_url }} (based on var iiab_home_url)
|
msg: roles/httpd/tasks/homepage.yml will run LATER (invoked by roles/www_options/tasks/main.yml) SO THAT APACHE CAN REDIRECT http://box TO http://box{{ iiab_home_url }} (based on var iiab_home_url)
|
||||||
# - include_tasks: roles/httpd/tasks/homepage.yml
|
# - include_tasks: roles/httpd/tasks/homepage.yml
|
||||||
|
|
||||||
# - name: Enable & Stop '{{ apache_service }}' systemd service
|
# - name: Enable & Stop '{{ apache_service }}' systemd service
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
src: sshpwd-lxde-iiab.sh
|
src: sshpwd-lxde-iiab.sh
|
||||||
dest: /etc/xdg/lxsession/LXDE-pi/
|
dest: /etc/xdg/lxsession/LXDE-pi/
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
when: lx.stat.isdir is defined and lx.stat.isdir and is_rpi and is_debuntu
|
when: lx.stat.isdir is defined and lx.stat.isdir and is_raspbian and is_debuntu
|
||||||
|
|
||||||
# 2019-03-07: This popup (/etc/xdg/lxsession/LXDE-pi/sshpwd-lxde-iiab.sh) does
|
# 2019-03-07: This popup (/etc/xdg/lxsession/LXDE-pi/sshpwd-lxde-iiab.sh) does
|
||||||
# not actually appear when triggered by /etc/xdg/autostart/pprompt-iiab.desktop
|
# not actually appear when triggered by /etc/xdg/autostart/pprompt-iiab.desktop
|
||||||
|
@ -47,4 +47,4 @@
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/xdg/lxsession/LXDE-pi/autostart
|
path: /etc/xdg/lxsession/LXDE-pi/autostart
|
||||||
line: "@/etc/xdg/lxsession/LXDE-pi/sshpwd-lxde-iiab.sh"
|
line: "@/etc/xdg/lxsession/LXDE-pi/sshpwd-lxde-iiab.sh"
|
||||||
when: lx.stat.isdir is defined and lx.stat.isdir and is_rpi and is_debuntu
|
when: lx.stat.isdir is defined and lx.stat.isdir and is_raspbian and is_debuntu
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#- name: Run 'mv /etc/pip.conf /etc/pip.conf.see-iiab-issue-2139' as "TEMPORARY" workaround (2020-01-17) for piwheels.org's setuptools Python 2/3 brokenness on RPi (https://github.com/iiab/iiab/issues/2139)
|
#- name: Run 'mv /etc/pip.conf /etc/pip.conf.see-iiab-issue-2139' as "TEMPORARY" workaround (2020-01-17) for piwheels.org's setuptools Python 2/3 brokenness on RPi (https://github.com/iiab/iiab/issues/2139)
|
||||||
# command: mv /etc/pip.conf /etc/pip.conf.see-iiab-issue-2139
|
# command: mv /etc/pip.conf /etc/pip.conf.see-iiab-issue-2139
|
||||||
# ignore_errors: yes
|
# ignore_errors: yes
|
||||||
# when: is_rpi | bool
|
# when: is_raspbian | bool
|
||||||
|
|
||||||
#- name: Install KA Lite non-static + reqs file with pip - (debuntu)
|
#- name: Install KA Lite non-static + reqs file with pip - (debuntu)
|
||||||
# pip: requirements={{ pip_packages_dir }}/kalite.txt
|
# pip: requirements={{ pip_packages_dir }}/kalite.txt
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#- name: Run 'mv /etc/pip.conf /etc/pip.conf.see-iiab-issue-2139' as "TEMPORARY" workaround (2020-01-17) for piwheels.org's setuptools Python 2/3 brokenness on RPi (https://github.com/iiab/iiab/issues/2139)
|
#- name: Run 'mv /etc/pip.conf /etc/pip.conf.see-iiab-issue-2139' as "TEMPORARY" workaround (2020-01-17) for piwheels.org's setuptools Python 2/3 brokenness on RPi (https://github.com/iiab/iiab/issues/2139)
|
||||||
# command: mv /etc/pip.conf /etc/pip.conf.see-iiab-issue-2139
|
# command: mv /etc/pip.conf /etc/pip.conf.see-iiab-issue-2139
|
||||||
# ignore_errors: yes
|
# ignore_errors: yes
|
||||||
# when: is_rpi | bool
|
# when: is_raspbian | bool
|
||||||
|
|
||||||
- name: Use pip to install KA Lite static to {{ kalite_venv }}
|
- name: Use pip to install KA Lite static to {{ kalite_venv }}
|
||||||
pip:
|
pip:
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# only works if server run as root
|
# only works if server run as root
|
||||||
minetest_runas_user: root
|
minetest_runas_user: root
|
||||||
minetest_runas_group: root
|
minetest_runas_group: root
|
||||||
when: is_rpi | bool
|
when: is_raspbian | bool
|
||||||
|
|
||||||
# For other installs
|
# For other installs
|
||||||
- name: Set some facts for other platforms
|
- name: Set some facts for other platforms
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
minetest_working_dir: /usr/share/games/minetest
|
minetest_working_dir: /usr/share/games/minetest
|
||||||
minetest_runas_user: Debian-minetest
|
minetest_runas_user: Debian-minetest
|
||||||
minetest_runas_group: games
|
minetest_runas_group: games
|
||||||
when: not is_rpi
|
when: not is_raspbian
|
||||||
|
|
||||||
- name: Set some facts for all
|
- name: Set some facts for all
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|
|
@ -16,11 +16,11 @@
|
||||||
|
|
||||||
# rpi only
|
# rpi only
|
||||||
- include_tasks: rpi_minetest_install.yml
|
- include_tasks: rpi_minetest_install.yml
|
||||||
when: not minetest_world.stat.exists and is_rpi
|
when: not minetest_world.stat.exists and is_raspbian
|
||||||
|
|
||||||
# not rpi
|
# not rpi
|
||||||
- include_tasks: minetest_install.yml
|
- include_tasks: minetest_install.yml
|
||||||
when: not minetest_world.stat.exists and not is_rpi
|
when: not minetest_world.stat.exists and not is_raspbian
|
||||||
|
|
||||||
- git:
|
- git:
|
||||||
repo: https://github.com/Calinou/carbone-ng.git
|
repo: https://github.com/Calinou/carbone-ng.git
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
- name: Download Minetest {{ minetest_rpi_src_url }} for RPi
|
- name: Download Minetest {{ minetest_rpi_src_url }} for RPi
|
||||||
get_url:
|
get_url:
|
||||||
url: "{{ minetest_rpi_src_url }}"
|
url: "{{ minetest_rpi_src_url }}"
|
||||||
dest: "{{ downloads_dir }}/{{ minetest_rpi_src }}"
|
dest: "{{ downloads_dir }}/{{ minetest_rpi_src_tar }}"
|
||||||
timeout: "{{ download_timeout }}"
|
timeout: "{{ download_timeout }}"
|
||||||
|
|
||||||
# we need to create these for rpi, but package creates them for other OSes
|
# we need to create these for rpi, but package creates them for other OSes
|
||||||
|
@ -23,17 +23,17 @@
|
||||||
- /etc/minetest
|
- /etc/minetest
|
||||||
- /var/log/minetest
|
- /var/log/minetest
|
||||||
|
|
||||||
- name: Extract {{ downloads_dir }}/{{ minetest_rpi_src }} into /library/games
|
- name: Extract {{ downloads_dir }}/{{ minetest_rpi_src_tar }} into /library/games
|
||||||
unarchive:
|
unarchive:
|
||||||
src: "{{ downloads_dir }}/{{ minetest_rpi_src }}"
|
src: "{{ downloads_dir }}/{{ minetest_rpi_src_tar }}"
|
||||||
dest: /library/games
|
dest: /library/games
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
|
||||||
- name: Symlink /library/games/minetest -> /library/games/0.4.17.1
|
- name: Create symlink /library/games/minetest => /library/games/{{ minetest_rpi_src_untarred }}
|
||||||
file:
|
file:
|
||||||
state: link
|
state: link
|
||||||
src: /library/games/0.4.17.1
|
src: /library/games/{{ minetest_rpi_src_untarred }}
|
||||||
dest: /library/games/minetest
|
dest: /library/games/minetest
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
- mongodb-server
|
- mongodb-server
|
||||||
- mongodb # 2019-01-31: this package does not exist on (cannot be installed on) Debian 10, SEE #1437
|
- mongodb # 2019-01-31: this package does not exist on (cannot be installed on) Debian 10, SEE #1437
|
||||||
state: present
|
state: present
|
||||||
when: internet_available and not is_rpi
|
when: internet_available and not is_raspbian
|
||||||
|
|
||||||
# 2019-02-02: Sugarizer with Node.js 10.x requires MongoDB 2.6+ so
|
# 2019-02-02: Sugarizer with Node.js 10.x requires MongoDB 2.6+ so
|
||||||
# https://andyfelong.com/2017/08/mongodb-3-0-14-for-raspbian-stretch/
|
# https://andyfelong.com/2017/08/mongodb-3-0-14-for-raspbian-stretch/
|
||||||
|
@ -22,29 +22,29 @@
|
||||||
file:
|
file:
|
||||||
path: /tmp/mongodb-3.0.1x
|
path: /tmp/mongodb-3.0.1x
|
||||||
state: directory
|
state: directory
|
||||||
when: internet_available and is_rpi
|
when: internet_available and is_raspbian
|
||||||
|
|
||||||
- name: Download & unzip 20MB http://download.iiab.io/packages/mongodb_stretch_3_0_14_core.zip to /tmp/mongodb-3.0.1x (rpi)
|
- name: Download & unzip 20MB http://download.iiab.io/packages/mongodb_stretch_3_0_14_core.zip to /tmp/mongodb-3.0.1x (rpi)
|
||||||
unarchive:
|
unarchive:
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
src: "{{ iiab_download_url }}/mongodb_stretch_3_0_14_core.zip"
|
src: "{{ iiab_download_url }}/mongodb_stretch_3_0_14_core.zip"
|
||||||
dest: /tmp/mongodb-3.0.1x
|
dest: /tmp/mongodb-3.0.1x
|
||||||
when: internet_available and is_rpi
|
when: internet_available and is_raspbian
|
||||||
|
|
||||||
- name: Install (move) its 3 CORE binaries from /tmp/mongodb-3.0.1x/core to /usr/bin (rpi)
|
- name: Install (move) its 3 CORE binaries from /tmp/mongodb-3.0.1x/core to /usr/bin (rpi)
|
||||||
shell: mv /tmp/mongodb-3.0.1x/core/* /usr/bin
|
shell: mv /tmp/mongodb-3.0.1x/core/* /usr/bin
|
||||||
when: internet_available and is_rpi
|
when: internet_available and is_raspbian
|
||||||
|
|
||||||
- name: Download & unzip 15MB http://download.iiab.io/packages/mongodb_stretch_3_0_14_tools.zip [IN FACT THIS ONE'S 3.0.15] to /tmp/mongodb-3.0.1x (rpi)
|
- name: Download & unzip 15MB http://download.iiab.io/packages/mongodb_stretch_3_0_14_tools.zip [IN FACT THIS ONE'S 3.0.15] to /tmp/mongodb-3.0.1x (rpi)
|
||||||
unarchive:
|
unarchive:
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
src: "{{ iiab_download_url }}/mongodb_stretch_3_0_14_tools.zip"
|
src: "{{ iiab_download_url }}/mongodb_stretch_3_0_14_tools.zip"
|
||||||
dest: /tmp/mongodb-3.0.1x
|
dest: /tmp/mongodb-3.0.1x
|
||||||
when: internet_available and is_rpi
|
when: internet_available and is_raspbian
|
||||||
|
|
||||||
- name: Install (move) its 9 TOOLS binaries from /opt/iiab/downloads/mongodb-3.0.1x/tools to /usr/bin (rpi)
|
- name: Install (move) its 9 TOOLS binaries from /opt/iiab/downloads/mongodb-3.0.1x/tools to /usr/bin (rpi)
|
||||||
shell: mv /tmp/mongodb-3.0.1x/tools/* /usr/bin
|
shell: mv /tmp/mongodb-3.0.1x/tools/* /usr/bin
|
||||||
when: internet_available and is_rpi
|
when: internet_available and is_raspbian
|
||||||
|
|
||||||
# OLD WAY / MUCH SLOWER: had put unnec duplicate copies in /opt/iiab/downloads/mongodb-3.0.1x
|
# OLD WAY / MUCH SLOWER: had put unnec duplicate copies in /opt/iiab/downloads/mongodb-3.0.1x
|
||||||
#
|
#
|
||||||
|
@ -52,14 +52,14 @@
|
||||||
# file:
|
# file:
|
||||||
# path: "{{ downloads_dir }}/mongodb-3.0.1x"
|
# path: "{{ downloads_dir }}/mongodb-3.0.1x"
|
||||||
# state: directory
|
# state: directory
|
||||||
# when: internet_available and is_rpi
|
# when: internet_available and is_raspbian
|
||||||
#
|
#
|
||||||
#- name: Download & unzip MongoDB 3.0.14's 3 core binaries to /opt/iiab/downloads/mongodb-3.0.1x (rpi)
|
#- name: Download & unzip MongoDB 3.0.14's 3 core binaries to /opt/iiab/downloads/mongodb-3.0.1x (rpi)
|
||||||
# unarchive:
|
# unarchive:
|
||||||
# remote_src: yes
|
# remote_src: yes
|
||||||
# src: "{{ iiab_download_url }}/mongodb_stretch_3_0_14_core.zip"
|
# src: "{{ iiab_download_url }}/mongodb_stretch_3_0_14_core.zip"
|
||||||
# dest: "{{ downloads_dir }}/mongodb-3.0.1x"
|
# dest: "{{ downloads_dir }}/mongodb-3.0.1x"
|
||||||
# when: internet_available and is_rpi
|
# when: internet_available and is_raspbian
|
||||||
#
|
#
|
||||||
#- name: Install (copy) 3 binaries from /opt/iiab/downloads/mongodb-3.0.1x/core to /usr/bin (rpi)
|
#- name: Install (copy) 3 binaries from /opt/iiab/downloads/mongodb-3.0.1x/core to /usr/bin (rpi)
|
||||||
# copy:
|
# copy:
|
||||||
|
@ -67,14 +67,14 @@
|
||||||
# dest: /usr/bin
|
# dest: /usr/bin
|
||||||
# with_fileglob:
|
# with_fileglob:
|
||||||
# - "{{ downloads_dir }}/mongodb-3.0.1x/core/*"
|
# - "{{ downloads_dir }}/mongodb-3.0.1x/core/*"
|
||||||
# when: internet_available and is_rpi
|
# when: internet_available and is_raspbian
|
||||||
#
|
#
|
||||||
#- name: Download & unzip MongoDB 3.0.15's 9 tools binaries to /opt/iiab/downloads/mongodb-3.0.1x (rpi)
|
#- name: Download & unzip MongoDB 3.0.15's 9 tools binaries to /opt/iiab/downloads/mongodb-3.0.1x (rpi)
|
||||||
# unarchive:
|
# unarchive:
|
||||||
# remote_src: yes
|
# remote_src: yes
|
||||||
# src: "{{ iiab_download_url }}/mongodb_stretch_3_0_14_tools.zip"
|
# src: "{{ iiab_download_url }}/mongodb_stretch_3_0_14_tools.zip"
|
||||||
# dest: "{{ downloads_dir }}/mongodb-3.0.1x"
|
# dest: "{{ downloads_dir }}/mongodb-3.0.1x"
|
||||||
# when: internet_available and is_rpi
|
# when: internet_available and is_raspbian
|
||||||
#
|
#
|
||||||
#- name: Install (copy) 9 binaries from /opt/iiab/downloads/mongodb-3.0.1x/tools to /usr/bin (rpi)
|
#- name: Install (copy) 9 binaries from /opt/iiab/downloads/mongodb-3.0.1x/tools to /usr/bin (rpi)
|
||||||
# copy:
|
# copy:
|
||||||
|
@ -82,13 +82,13 @@
|
||||||
# dest: /usr/bin
|
# dest: /usr/bin
|
||||||
# with_fileglob:
|
# with_fileglob:
|
||||||
# - "{{ downloads_dir }}/mongodb-3.0.1x/tools/*"
|
# - "{{ downloads_dir }}/mongodb-3.0.1x/tools/*"
|
||||||
# when: internet_available and is_rpi
|
# when: internet_available and is_raspbian
|
||||||
|
|
||||||
- name: Create Linux group mongodb (rpi)
|
- name: Create Linux group mongodb (rpi)
|
||||||
group:
|
group:
|
||||||
name: mongodb
|
name: mongodb
|
||||||
state: present
|
state: present
|
||||||
when: is_rpi | bool
|
when: is_raspbian | bool
|
||||||
|
|
||||||
- name: Create Linux user mongodb (rpi)
|
- name: Create Linux user mongodb (rpi)
|
||||||
user:
|
user:
|
||||||
|
@ -97,7 +97,7 @@
|
||||||
groups: mongodb
|
groups: mongodb
|
||||||
home: /var/lib/mongodb
|
home: /var/lib/mongodb
|
||||||
shell: /usr/sbin/nologin
|
shell: /usr/sbin/nologin
|
||||||
when: is_rpi | bool
|
when: is_raspbian | bool
|
||||||
|
|
||||||
|
|
||||||
# 2. CONFIGURE MongoDB FOR IIAB
|
# 2. CONFIGURE MongoDB FOR IIAB
|
||||||
|
|
|
@ -135,18 +135,7 @@
|
||||||
- name: LAN configured - 'Gateway' mode
|
- name: LAN configured - 'Gateway' mode
|
||||||
set_fact:
|
set_fact:
|
||||||
iiab_network_mode: "Gateway"
|
iiab_network_mode: "Gateway"
|
||||||
when: is_rpi or (not (iiab_lan_iface == "none") and not (iiab_wan_iface == "none"))
|
when: (not (iiab_lan_iface == "none") and not (iiab_wan_iface == "none"))
|
||||||
|
|
||||||
- name: Force iiab_lan_iface if is_rpi
|
|
||||||
set_fact:
|
|
||||||
iiab_lan_iface: "br0"
|
|
||||||
iiab_wireless_lan_iface: "wlan0"
|
|
||||||
when: is_rpi | bool
|
|
||||||
|
|
||||||
- name: Enable hostapd if discovered_wireless_iface is not WAN
|
|
||||||
set_fact:
|
|
||||||
hostapd_enabled: True
|
|
||||||
when: is_rpi and not (iiab_wan_iface == discovered_wireless_iface)
|
|
||||||
|
|
||||||
# override with user_lan_iface setting if no longer in auto
|
# override with user_lan_iface setting if no longer in auto
|
||||||
- name: Setting user LAN fact
|
- name: Setting user LAN fact
|
||||||
|
|
|
@ -41,13 +41,13 @@
|
||||||
template:
|
template:
|
||||||
dest: /etc/network/interfaces.d/iiab
|
dest: /etc/network/interfaces.d/iiab
|
||||||
src: network/systemd.j2
|
src: network/systemd.j2
|
||||||
when: not is_rpi and (iiab_lan_iface == "br0" or wan_ip != "dhcp" or gui_static_wan_ip == "undefined")
|
when: not is_raspbian (iiab_lan_iface == "br0" or wan_ip != "dhcp" or gui_static_wan_ip == "undefined")
|
||||||
|
|
||||||
- name: Copy the bridge script for RPi
|
- name: Copy the bridge script for RPi
|
||||||
template:
|
template:
|
||||||
dest: /etc/network/interfaces.d/iiab
|
dest: /etc/network/interfaces.d/iiab
|
||||||
src: network/rpi.j2
|
src: network/rpi.j2
|
||||||
when: is_rpi and iiab_lan_iface == "br0"
|
when: is_raspbian and iiab_lan_iface == "br0"
|
||||||
|
|
||||||
- name: Workaround auto issue - ifupdown compatibility mode (debian-9+)
|
- name: Workaround auto issue - ifupdown compatibility mode (debian-9+)
|
||||||
template:
|
template:
|
||||||
|
@ -62,24 +62,7 @@
|
||||||
regexp: "{{ iiab_wan_iface }}"
|
regexp: "{{ iiab_wan_iface }}"
|
||||||
when: wan_ip != "dhcp" and iiab_wan_iface != "none" and is_debian and not is_debian_8
|
when: wan_ip != "dhcp" and iiab_wan_iface != "none" and is_debian and not is_debian_8
|
||||||
|
|
||||||
- name: BIND may be affected
|
- include_tasks: down-debian.yml
|
||||||
service:
|
|
||||||
name: "{{ dns_service }}"
|
|
||||||
state: stopped
|
|
||||||
when: named_install and dnsmasq_enabled
|
|
||||||
|
|
||||||
# dhcpd_server release the interface
|
|
||||||
- name: dhcpd_server may be affected - stopping dhcpd
|
|
||||||
service:
|
|
||||||
name: dhcpd
|
|
||||||
state: stopped
|
|
||||||
when: dhcpd_install | bool
|
|
||||||
|
|
||||||
- name: dhcpd_server may be affected - stopping dnsmasq
|
|
||||||
service:
|
|
||||||
name: dnsmasq
|
|
||||||
state: stopped
|
|
||||||
when: dnsmasq_install | bool
|
|
||||||
|
|
||||||
- name: Reload systemd
|
- name: Reload systemd
|
||||||
systemd:
|
systemd:
|
||||||
|
|
|
@ -141,7 +141,7 @@
|
||||||
- name: Set iiab_wired_lan_iface if present
|
- name: Set iiab_wired_lan_iface if present
|
||||||
set_fact:
|
set_fact:
|
||||||
iiab_wired_lan_iface: "{{ discovered_wired_iface }}"
|
iiab_wired_lan_iface: "{{ discovered_wired_iface }}"
|
||||||
when: discovered_wired_iface is defined and discovered_wired_iface != "none" and discovered_wired_iface != iiab_wan_iface and not is_rpi
|
when: discovered_wired_iface is defined and discovered_wired_iface != "none" and discovered_wired_iface != iiab_wan_iface and not is_raspbian
|
||||||
|
|
||||||
#unused
|
#unused
|
||||||
#- name: Get a list of ifcfg files to delete
|
#- name: Get a list of ifcfg files to delete
|
||||||
|
@ -151,14 +151,14 @@
|
||||||
- name: 2 or more devices on the LAN - use bridging
|
- name: 2 or more devices on the LAN - use bridging
|
||||||
set_fact:
|
set_fact:
|
||||||
iiab_lan_iface: br0
|
iiab_lan_iface: br0
|
||||||
when: num_lan_interfaces|int >= 2 and not is_rpi
|
when: num_lan_interfaces|int >= 2
|
||||||
|
|
||||||
- name: For Debian, always use bridging - except RPi
|
- name: For Debian, always use bridging
|
||||||
set_fact:
|
set_fact:
|
||||||
iiab_lan_iface: br0
|
iiab_lan_iface: br0
|
||||||
when: num_lan_interfaces|int >= 1 and is_debuntu and not is_rpi
|
when: num_lan_interfaces|int >= 1 and is_debuntu
|
||||||
|
|
||||||
- name: WiFi is on the LAN - use bridging - except RPi
|
- name: WiFi is on the LAN - use bridging
|
||||||
set_fact:
|
set_fact:
|
||||||
iiab_lan_iface: br0
|
iiab_lan_iface: br0
|
||||||
when: iiab_wireless_lan_iface is defined and not nobridge is defined
|
when: iiab_wireless_lan_iface is defined and not nobridge is defined
|
||||||
|
|
|
@ -98,7 +98,6 @@
|
||||||
when: dnsmasq_install and dnsmasq_enabled and nd_dir.stat.exists and nd_dir.stat.isdir and (iiab_network_mode != "Appliance")
|
when: dnsmasq_install and dnsmasq_enabled and nd_dir.stat.exists and nd_dir.stat.isdir and (iiab_network_mode != "Appliance")
|
||||||
#when: dnsmasq_install and dnsmasq_enabled and nd_enabled is defined and nd_enabled.stdout == "enabled" and nd_dir.stat.exists and nd_dir.stat.isdir and (iiab_network_mode != "Appliance")
|
#when: dnsmasq_install and dnsmasq_enabled and nd_enabled is defined and nd_enabled.stdout == "enabled" and nd_dir.stat.exists and nd_dir.stat.isdir and (iiab_network_mode != "Appliance")
|
||||||
#when: dnsmasq_install and dnsmasq_enabled and systemd_out.status.UnitFileState == "enabled" and networkd_dir.stat.exists and networkd_dir.stat.isdir and (iiab_network_mode != "Appliance")
|
#when: dnsmasq_install and dnsmasq_enabled and systemd_out.status.UnitFileState == "enabled" and networkd_dir.stat.exists and networkd_dir.stat.isdir and (iiab_network_mode != "Appliance")
|
||||||
#when: dnsmasq_enabled and dnsmasq_install and (iiab_network_mode != "Appliance") and (not is_rpi) and (not is_ubuntu_16)
|
|
||||||
|
|
||||||
- name: Remove /etc/dnsmasq.d/iiab.conf, when not dnsmasq_enabled or is Appliance
|
- name: Remove /etc/dnsmasq.d/iiab.conf, when not dnsmasq_enabled or is Appliance
|
||||||
file:
|
file:
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when: is_rpi | bool
|
when: is_raspbian | bool
|
||||||
|
|
||||||
- name: Create /usr/bin/iiab-hotspot-off from template
|
- name: Create /usr/bin/iiab-hotspot-off from template
|
||||||
template:
|
template:
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when: is_rpi | bool
|
when: is_raspbian | bool
|
||||||
|
|
||||||
- name: Disable the Access Point 'hostapd' service
|
- name: Disable the Access Point 'hostapd' service
|
||||||
systemd:
|
systemd:
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
# iiab_wan_iface: "{{ discovered_wired_iface }}"
|
# iiab_wan_iface: "{{ discovered_wired_iface }}"
|
||||||
# iiab_wireless_lan_iface: "{{ discovered_wireless_iface }}"
|
# iiab_wireless_lan_iface: "{{ discovered_wireless_iface }}"
|
||||||
# iiab_wired_lan_iface: ""
|
# iiab_wired_lan_iface: ""
|
||||||
# when: is_rpi and discovered_wireless_iface is defined and discovered_wireless_iface == iiab_wan_iface and reboot_to_AP
|
# when: is_raspbian and discovered_wireless_iface is defined and discovered_wireless_iface == iiab_wan_iface and reboot_to_AP
|
||||||
|
|
||||||
- include_tasks: computed_network.yml
|
- include_tasks: computed_network.yml
|
||||||
when: not installing #REMOVE THIS LINE IF installing IS ALWAYS false AS SET IN roles/0-init/defaults/main.yml
|
when: not installing #REMOVE THIS LINE IF installing IS ALWAYS false AS SET IN roles/0-init/defaults/main.yml
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
# set_fact:
|
# set_fact:
|
||||||
# no_net_restart: True
|
# no_net_restart: True
|
||||||
# hostapd_enabled: False
|
# hostapd_enabled: False
|
||||||
# when: is_rpi and discovered_wireless_iface is defined and discovered_wired_iface != iiab_wan_iface
|
# when: is_raspbian and discovered_wireless_iface is defined and discovered_wired_iface != iiab_wan_iface
|
||||||
|
|
||||||
##### Start static ip address info for first run #####
|
##### Start static ip address info for first run #####
|
||||||
#- include_tasks: static.yml
|
#- include_tasks: static.yml
|
||||||
|
@ -91,12 +91,12 @@
|
||||||
|
|
||||||
- name: RPi's have dhcpcd in use
|
- name: RPi's have dhcpcd in use
|
||||||
include_tasks: rpi_debian.yml
|
include_tasks: rpi_debian.yml
|
||||||
when: is_debuntu and is_rpi
|
when: is_raspbian
|
||||||
#and not installing
|
#and not installing
|
||||||
|
|
||||||
- name: Not RPi, Not NetworkManager, Not systemd-networkd in use
|
- name: Not RPi, Not NetworkManager, Not systemd-networkd in use
|
||||||
include_tasks: debian.yml
|
include_tasks: debian.yml
|
||||||
when: (not is_rpi and not network_manager_active and not systemd_networkd_active and is_debuntu) or is_ubuntu_16
|
when: (not is_raspbian and not network_manager_active and not systemd_networkd_active and is_debuntu) or is_ubuntu_16
|
||||||
#and not installing
|
#and not installing
|
||||||
|
|
||||||
#### end network layout
|
#### end network layout
|
||||||
|
|
|
@ -42,9 +42,9 @@ slaac private
|
||||||
# Always (try) to run DHCP client on RPi's Ethernet port, for in-field
|
# Always (try) to run DHCP client on RPi's Ethernet port, for in-field
|
||||||
# "cablemodems" used by many non-technical operators, who want Zero-Hassle
|
# "cablemodems" used by many non-technical operators, who want Zero-Hassle
|
||||||
# Updates. This means AVOIDING "denyinterfaces eth0" below:
|
# Updates. This means AVOIDING "denyinterfaces eth0" below:
|
||||||
{% if is_rpi and hostapd_enabled %}
|
{% if is_raspbian and hostapd_enabled %}
|
||||||
denyinterfaces{% if discovered_wireless_iface != "none" %} {{ discovered_wireless_iface }}{% endif %}
|
denyinterfaces{% if discovered_wireless_iface != "none" %} {{ discovered_wireless_iface }}{% endif %}
|
||||||
{% elif is_rpi %}
|
{% elif is_raspbian %}
|
||||||
#denyinterfaces{% if discovered_wireless_iface != "none" %} {{ discovered_wireless_iface }}{% endif %}
|
#denyinterfaces{% if discovered_wireless_iface != "none" %} {{ discovered_wireless_iface }}{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
denyinterfaces{% if iiab_wireless_lan_iface is defined %} {{ iiab_wireless_lan_iface }}{% endif %}{% if iiab_wired_lan_iface is defined %} {{ iiab_wired_lan_iface }}{% endif %}
|
denyinterfaces{% if iiab_wireless_lan_iface is defined %} {{ iiab_wireless_lan_iface }}{% endif %}{% if iiab_wired_lan_iface is defined %} {{ iiab_wired_lan_iface }}{% endif %}
|
||||||
|
|
|
@ -33,7 +33,7 @@ To further refine Nextcloud access controls based on IPv4 addresses, you can edi
|
||||||
- max_execution_time
|
- max_execution_time
|
||||||
- max_input_time
|
- max_input_time
|
||||||
|
|
||||||
Useful PHP recommendations for these settings (while largely tailored to WordPress, and aimed at very low-end hardware) can be found here: [/opt/iiab/iiab/roles/www_front_end/tasks/main.yml#L47-L51](../www_front_end/tasks/main.yml#L47-L51)
|
Useful PHP recommendations for these settings (while largely tailored to WordPress, and aimed at very low-end hardware) can be found here: [/opt/iiab/iiab/roles/www_options/tasks/main.yml#L47-L51](../www_options/tasks/main.yml#L47-L51)
|
||||||
|
|
||||||
## Using It
|
## Using It
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
#- php-cli # NOT REQUESTED by Nextcloud
|
#- php-cli # NOT REQUESTED by Nextcloud
|
||||||
#- php-common # NOT REQUESTED by Nextcloud
|
#- php-common # NOT REQUESTED by Nextcloud
|
||||||
- php-curl
|
- php-curl
|
||||||
- php-fpm # ALSO INSTALLED IN roles/www_back_end (Stage 3) for nginx_high_php_limits
|
- php-fpm # ALSO INSTALLED IN roles/www_options (Stage 4) for nginx_high_php_limits
|
||||||
- php-gd
|
- php-gd
|
||||||
- php-gmp # Optional (for SFTP storage)
|
- php-gmp # Optional (for SFTP storage)
|
||||||
- php-imagick # Optional (for preview generation)
|
- php-imagick # Optional (for preview generation)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Both invoked in 4-SERVER-OPTIONS, by roles/www_front_end/tasks/main.yml:
|
# Both invoked in 4-SERVER-OPTIONS, by roles/www_options/tasks/main.yml:
|
||||||
#
|
#
|
||||||
# httpd/tasks/homepage.yml
|
# httpd/tasks/homepage.yml
|
||||||
# nginx/tasks/homepage.yml
|
# nginx/tasks/homepage.yml
|
||||||
|
|
|
@ -46,10 +46,10 @@
|
||||||
#- { src: 'iiab.conf.j2', dest: "{{ nginx_conf_dir }}/iiab.conf" } # Moved into homepage.yml below
|
#- { src: 'iiab.conf.j2', dest: "{{ nginx_conf_dir }}/iiab.conf" } # Moved into homepage.yml below
|
||||||
|
|
||||||
- debug:
|
- debug:
|
||||||
msg: roles/nginx/tasks/homepage.yml will run LATER (invoked by roles/www_front_end/tasks/main.yml) SO THAT NGINX CAN REDIRECT http://box TO http://box{{ iiab_home_url }} (based on var iiab_home_url)
|
msg: roles/nginx/tasks/homepage.yml will run LATER (invoked by roles/www_options/tasks/main.yml) SO THAT NGINX CAN REDIRECT http://box TO http://box{{ iiab_home_url }} (based on var iiab_home_url)
|
||||||
# - include_tasks: roles/nginx/tasks/homepage.yml
|
# - include_tasks: roles/nginx/tasks/homepage.yml
|
||||||
|
|
||||||
# php-stem extension installed by roles/www_back_end/tasks/php-stem.yml
|
# php-stem extension installed by roles/www_base/tasks/php-stem.yml
|
||||||
# here it is linked to php-fpm
|
# here it is linked to php-fpm
|
||||||
- name: Symlink /etc/php/{{ php_version }}/fpm/conf.d/20-stem.ini -> /etc/php/{{ php_version }}/mods-available/stem.ini
|
- name: Symlink /etc/php/{{ php_version }}/fpm/conf.d/20-stem.ini -> /etc/php/{{ php_version }}/mods-available/stem.ini
|
||||||
file:
|
file:
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
|
|
||||||
- name: "Globally 'npm install' 8 Node-RED learning examples for RPi: node-red-contrib-ibm-watson-iot, node-red-contrib-play-audio, node-red-node-ledborg, node-red-node-ping, node-red-node-pi-sense-hat, node-red-node-random, node-red-node-serialport, node-red-node-smooth"
|
- name: "Globally 'npm install' 8 Node-RED learning examples for RPi: node-red-contrib-ibm-watson-iot, node-red-contrib-play-audio, node-red-node-ledborg, node-red-node-ping, node-red-node-pi-sense-hat, node-red-node-random, node-red-node-serialport, node-red-node-smooth"
|
||||||
command: npm install -g --unsafe-perm node-red-contrib-ibm-watson-iot node-red-contrib-play-audio node-red-node-ledborg node-red-node-ping node-red-node-pi-sense-hat node-red-node-random node-red-node-serialport node-red-node-smooth
|
command: npm install -g --unsafe-perm node-red-contrib-ibm-watson-iot node-red-contrib-play-audio node-red-node-ledborg node-red-node-ping node-red-node-pi-sense-hat node-red-node-random node-red-node-serialport node-red-node-smooth
|
||||||
when: nodered_install and internet_available and is_rpi
|
when: nodered_install and internet_available and is_raspbian
|
||||||
|
|
||||||
## To protect pre-installed packages within /usr/lib/node_modules in graphical
|
## To protect pre-installed packages within /usr/lib/node_modules in graphical
|
||||||
## desktop OS's like Raspbian Desktop & Ubermix, we now only install those that
|
## desktop OS's like Raspbian Desktop & Ubermix, we now only install those that
|
||||||
|
@ -89,10 +89,10 @@
|
||||||
# when: nodered_install and internet_available
|
# when: nodered_install and internet_available
|
||||||
|
|
||||||
- include_tasks: group.yml
|
- include_tasks: group.yml
|
||||||
when: nodered_install and not is_rpi
|
when: nodered_install and not is_raspbian
|
||||||
|
|
||||||
- include_tasks: rpi_desk.yml
|
- include_tasks: rpi_desk.yml
|
||||||
when: nodered_install and internet_available and is_rpi
|
when: nodered_install and internet_available and is_raspbian
|
||||||
|
|
||||||
- name: Install /etc/systemd/system/nodered.service systemd unit file from template
|
- name: Install /etc/systemd/system/nodered.service systemd unit file from template
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
#- name: Replace/Tweak "node-red-contrib-ibm-watson-iot/examples/Pi cpu temperature.json" (rpi)
|
#- name: Replace/Tweak "node-red-contrib-ibm-watson-iot/examples/Pi cpu temperature.json" (rpi)
|
||||||
# command: 'curl -sL -o /usr/lib/node_modules/node-red-contrib-ibm-watson-iot/examples/Pi\ cpu\ temperature.json https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/Pi%20cpu%20temperature.json'
|
# command: 'curl -sL -o /usr/lib/node_modules/node-red-contrib-ibm-watson-iot/examples/Pi\ cpu\ temperature.json https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/Pi%20cpu%20temperature.json'
|
||||||
# when: nodered_install and internet_available and is_rpi
|
# when: nodered_install and internet_available and is_raspbian
|
||||||
|
|
||||||
- name: 'Download/Install 4 RPi executables to /usr/bin: node-red-start, node-red-stop, node-red-restart, node-red-log'
|
- name: 'Download/Install 4 RPi executables to /usr/bin: node-red-start, node-red-stop, node-red-restart, node-red-log'
|
||||||
get_url:
|
get_url:
|
||||||
|
|
|
@ -5,7 +5,7 @@ After=syslog.target network.target
|
||||||
[Service]
|
[Service]
|
||||||
# Ansible template HAD: if is_debian_8 or is_debian_9 or is_ubuntu_16 or is_ubuntu_17
|
# Ansible template HAD: if is_debian_8 or is_debian_9 or is_ubuntu_16 or is_ubuntu_17
|
||||||
# Ansible template HAD: if is_debuntu
|
# Ansible template HAD: if is_debuntu
|
||||||
{% if is_rpi %}
|
{% if is_raspbian %}
|
||||||
ExecStart=/usr/bin/node-red-pi --max-old-space-size=128 -v
|
ExecStart=/usr/bin/node-red-pi --max-old-space-size=128 -v
|
||||||
{% else %}
|
{% else %}
|
||||||
# ExecStart=/usr/local/bin/node-red-pi --max-old-space-size=128 -v
|
# ExecStart=/usr/local/bin/node-red-pi --max-old-space-size=128 -v
|
||||||
|
@ -19,7 +19,7 @@ SyslogIdentifier=node-red
|
||||||
StandardOutput=syslog
|
StandardOutput=syslog
|
||||||
|
|
||||||
# non-root user to run as
|
# non-root user to run as
|
||||||
{% if is_rpi %}
|
{% if is_raspbian %}
|
||||||
WorkingDirectory=/home/pi/
|
WorkingDirectory=/home/pi/
|
||||||
User=pi
|
User=pi
|
||||||
Group=pi
|
Group=pi
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
KERNEL=="sd*", DRIVERS=="sbp2", ACTION=="add", PROGRAM="/bin/systemd-escape -p --template=usbmount@.service $env{DEVNAME}", ENV{SYSTEMD_WANTS}+="%c"
|
KERNEL=="sd*", DRIVERS=="sbp2", ACTION=="add", PROGRAM="/bin/systemd-escape -p --template=usbmount@.service $env{DEVNAME}", ENV{SYSTEMD_WANTS}+="%c"
|
||||||
KERNEL=="sd*", SUBSYSTEMS=="usb", ACTION=="add", PROGRAM="/bin/systemd-escape -p --template=usbmount@.service $env{DEVNAME}", ENV{SYSTEMD_WANTS}+="%c"
|
KERNEL=="sd*", SUBSYSTEMS=="usb", ACTION=="add", PROGRAM="/bin/systemd-escape -p --template=usbmount@.service $env{DEVNAME}", ENV{SYSTEMD_WANTS}+="%c"
|
||||||
KERNEL=="ub*", SUBSYSTEMS=="usb", ACTION=="add", PROGRAM="/bin/systemd-escape -p --template=usbmount@.service $env{DEVNAME}", ENV{SYSTEMD_WANTS}+="%c"
|
KERNEL=="ub*", SUBSYSTEMS=="usb", ACTION=="add", PROGRAM="/bin/systemd-escape -p --template=usbmount@.service $env{DEVNAME}", ENV{SYSTEMD_WANTS}+="%c"
|
||||||
KERNEL=="sd*", ACTION=="remove", RUN+="/usr/share/usbmount/usbmount remove"
|
KERNEL=="sd*", SUBSYSTEMS=="usb", ACTION=="remove", PROGRAM="/usr/share/usbmount/usbmount remove"
|
||||||
|
|
||||||
|
|
|
@ -8,5 +8,6 @@ Type=oneshot
|
||||||
TimeoutStartSec=0
|
TimeoutStartSec=0
|
||||||
Environment=DEVNAME=%I
|
Environment=DEVNAME=%I
|
||||||
ExecStart=/usr/share/usbmount/usbmount add
|
ExecStart=/usr/share/usbmount/usbmount add
|
||||||
|
ExecStop=/bin/umount /%I
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
location {{ wp_url }} {
|
location {{ wp_url }} {
|
||||||
#rewrite_log on;
|
#rewrite_log on;
|
||||||
root {{ content_base }};
|
root {{ content_base }};
|
||||||
|
try_files $uri $uri/ /wordpress/index.php$is_args$args;
|
||||||
|
|
||||||
location ~ .*\.php$ {
|
location ~ .*\.php$ {
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
|
@ -1,5 +1,5 @@
|
||||||
# Role "www_back_end" runs here, probably in 3-BASE-SERVER.
|
# Role "www_base" runs here, probably in 3-BASE-SERVER.
|
||||||
# Role "www_front_end" runs later, likely in 4-SERVER-OPTIONS.
|
# Role "www_options" runs later, likely in 4-SERVER-OPTIONS.
|
||||||
#
|
#
|
||||||
# (Don't take either name too literally!)
|
# (Don't take either name too literally!)
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
||||||
- include_tasks: html.yml
|
- include_tasks: html.yml
|
||||||
- include_tasks: php-stem.yml
|
- include_tasks: php-stem.yml
|
||||||
|
|
||||||
- name: Create dir {{ doc_root }}/home -- if you customized var iiab_home_url e.g. in /etc/iiab/local_vars.yml, that dir is created later -- by www_front_end/tasks/main.yml
|
- name: Create dir {{ doc_root }}/home -- if you customized var iiab_home_url e.g. in /etc/iiab/local_vars.yml, that dir is created later -- by www_options/tasks/main.yml
|
||||||
file:
|
file:
|
||||||
state: directory
|
state: directory
|
||||||
path: "{{ doc_root }}/home" # /library/www/html
|
path: "{{ doc_root }}/home" # /library/www/html
|
||||||
|
@ -30,14 +30,14 @@
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
|
||||||
|
|
||||||
# RECORD www_back_end AS INSTALLED
|
# RECORD www_base AS INSTALLED
|
||||||
|
|
||||||
- name: "Set 'www_back_end_installed: True'"
|
- name: "Set 'www_base_installed: True'"
|
||||||
set_fact:
|
set_fact:
|
||||||
www_back_end_installed: True
|
www_base_installed: True
|
||||||
|
|
||||||
- name: "Add 'www_back_end_installed: True' to {{ iiab_state_file }}"
|
- name: "Add 'www_base_installed: True' to {{ iiab_state_file }}"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml
|
path: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml
|
||||||
regexp: '^www_back_end_installed'
|
regexp: '^www_base_installed'
|
||||||
line: 'www_back_end_installed: True'
|
line: 'www_base_installed: True'
|
|
@ -11,7 +11,7 @@
|
||||||
group: root
|
group: root
|
||||||
#mode: ????
|
#mode: ????
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
when: is_rpi | bool
|
when: is_raspbian | bool
|
||||||
|
|
||||||
- name: Unarchive http://download.iiab.io/packages/php{{ php_version }}-stem.x64.tar to / (x64)
|
- name: Unarchive http://download.iiab.io/packages/php{{ php_version }}-stem.x64.tar to / (x64)
|
||||||
unarchive:
|
unarchive:
|
|
@ -1,5 +1,5 @@
|
||||||
# Role "www_back_end" runs earlier, likely in 3-BASE-SERVER.
|
# Role "www_base" runs earlier, likely in 3-BASE-SERVER.
|
||||||
# Role "www_front_end" runs here, probably in 4-SERVER-OPTIONS.
|
# Role "www_options" runs here, probably in 4-SERVER-OPTIONS.
|
||||||
#
|
#
|
||||||
# (Don't take either name too literally!)
|
# (Don't take either name too literally!)
|
||||||
|
|
||||||
|
@ -24,20 +24,35 @@
|
||||||
include_tasks: roles/nginx/tasks/homepage.yml
|
include_tasks: roles/nginx/tasks/homepage.yml
|
||||||
when: nginx_install | bool
|
when: nginx_install | bool
|
||||||
|
|
||||||
|
- debug:
|
||||||
|
msg: 'THE 3 ANSIBLE STANZAS BELOW ONLY RUN... when: (moodle_install or nextcloud_install or pbx_install or wordpress_install) and nginx_enabled'
|
||||||
|
|
||||||
- block: # 3-STANZA BLOCK BEGINS
|
- block: # 3-STANZA BLOCK BEGINS
|
||||||
|
|
||||||
# Also installed by roles/nextcloud/tasks/install.yml in case './runrole nextcloud' bypasses this role here. (Possibly make php-fpm mandatory in nginx/tasks/install.yml in future?)
|
# FYI roles/nginx has already installed package php-fpm, in 3-base-server
|
||||||
- name: Install php-fpm (FastCGI Process Manager) as nec
|
|
||||||
package:
|
|
||||||
name: php-fpm
|
|
||||||
|
|
||||||
# For schools that use WordPress/Nextcloud/Moodle intensively.
|
- name: Raise 2+2 PHP default values in /etc/php/{{ php_version }}/fpm/php.ini for lightweight use of WordPress/Nextcloud/Moodle/PBX (allow photos/docs up to 100MB, 100s timeouts, but preserve PHP's 128MB RAM limit)
|
||||||
# WARNING: Enabling this might cause excess use of RAM/disk or other resources!
|
lineinfile:
|
||||||
|
path: "/etc/php/{{ php_version }}/fpm/php.ini"
|
||||||
|
#path: "/etc/php/{{ php_version }}/{{ apache_service }}/php.ini"
|
||||||
|
regexp: "{{ item.regexp }}"
|
||||||
|
line: "{{ item.line }}"
|
||||||
|
with_items:
|
||||||
|
- { regexp: '^upload_max_filesize', line: 'upload_max_filesize = 100M ; default is 2M' }
|
||||||
|
- { regexp: '^post_max_size', line: 'post_max_size = 100M ; default is 8M' }
|
||||||
|
- { regexp: '^max_execution_time', line: 'max_execution_time = 100 ; default is 30' }
|
||||||
|
- { regexp: '^max_input_time', line: 'max_input_time = 100 ; default is 60' }
|
||||||
|
- { regexp: '^memory_limit', line: 'memory_limit = 128M ; default is 128M / Nextcloud requests 512M' }
|
||||||
|
when: not nginx_high_php_limits # REMINDER: THIS ENTIRE 4-STANZA BLOCK IS ONLY INVOKED... when: (wordpress_install or nextcloud_install or moodle_install or pbx_install) and nginx_enabled
|
||||||
|
|
||||||
|
# 2020-03-08: IIAB does not support uninstalling apps, so a 3rd clause
|
||||||
|
# (to reset/restore PHP's defaults) is not necessary at this time.
|
||||||
|
|
||||||
# COMPARE apache_allow_sudo further below.
|
# COMPARE apache_allow_sudo further below.
|
||||||
|
|
||||||
- name: Enact high limits in /etc/php/{{ php_version }}/fpm/php.ini if using WordPress/Nextcloud/Moodle intensively, as nec
|
# WARNING: This might cause excess use of RAM/disk or other resources!
|
||||||
|
# The 5 values below were chosen by @ericnitschke and @kananigit in ~2018.
|
||||||
|
- name: Enact nginx_high_php_limits in /etc/php/{{ php_version }}/fpm/php.ini for schools that use WordPress/Nextcloud/Moodle/PBX intensively (allow photos/docs up to 500MB, 300s timeouts, 512MB RAM limit)
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: "/etc/php/{{ php_version }}/fpm/php.ini"
|
path: "/etc/php/{{ php_version }}/fpm/php.ini"
|
||||||
#path: "/etc/php/{{ php_version }}/{{ apache_service }}/php.ini"
|
#path: "/etc/php/{{ php_version }}/{{ apache_service }}/php.ini"
|
||||||
|
@ -46,17 +61,17 @@
|
||||||
with_items:
|
with_items:
|
||||||
- { regexp: '^upload_max_filesize', line: 'upload_max_filesize = 500M ; default is 2M' }
|
- { regexp: '^upload_max_filesize', line: 'upload_max_filesize = 500M ; default is 2M' }
|
||||||
- { regexp: '^post_max_size', line: 'post_max_size = 500M ; default is 8M' }
|
- { regexp: '^post_max_size', line: 'post_max_size = 500M ; default is 8M' }
|
||||||
- { regexp: '^memory_limit', line: 'memory_limit = 512M ; default is 128M / Nextcloud requests 512M' }
|
|
||||||
- { regexp: '^max_execution_time', line: 'max_execution_time = 300 ; default is 30' }
|
- { regexp: '^max_execution_time', line: 'max_execution_time = 300 ; default is 30' }
|
||||||
- { regexp: '^max_input_time', line: 'max_input_time = 300 ; default is 60' }
|
- { regexp: '^max_input_time', line: 'max_input_time = 300 ; default is 60' }
|
||||||
when: nginx_high_php_limits
|
- { regexp: '^memory_limit', line: 'memory_limit = 512M ; default is 128M / Nextcloud requests 512M' }
|
||||||
|
when: nginx_high_php_limits | bool
|
||||||
|
|
||||||
- name: Restart 'php{{ php_version }}-fpm' systemd services, as nec
|
- name: Restart 'php{{ php_version }}-fpm' systemd service
|
||||||
systemd:
|
systemd:
|
||||||
name: "php{{ php_version }}-fpm"
|
name: "php{{ php_version }}-fpm"
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
when: (nextcloud_install or pbx_install) and nginx_enabled # 3-STANZA BLOCK ENDS
|
when: (moodle_install or nextcloud_install or pbx_install or wordpress_install) and nginx_enabled # 3-STANZA BLOCK ENDS
|
||||||
|
|
||||||
|
|
||||||
# 'Is a "Rapid Power Off" button possible for low-electricity environments?'
|
# 'Is a "Rapid Power Off" button possible for low-electricity environments?'
|
||||||
|
@ -64,7 +79,9 @@
|
||||||
|
|
||||||
# COMPARE nginx_high_php_limits further above.
|
# COMPARE nginx_high_php_limits further above.
|
||||||
|
|
||||||
# 2020-02-12: DOES THE FLAG BELOW (apache_allow_sudo) WORK WITH NGINX TOO ?
|
# 2020-03-08: DOES THE FLAG BELOW (apache_allow_sudo) PRESUMABLY WORK
|
||||||
|
# WITH NGINX TOO ? (The single-click poweroff button on IIAB's home
|
||||||
|
# page certainly does still work with NGINX.)
|
||||||
|
|
||||||
- name: Give {{ apache_user }} (per variable apache_user) permission to poweroff, installing /etc/sudoers.d/020_apache_poweroff from template
|
- name: Give {{ apache_user }} (per variable apache_user) permission to poweroff, installing /etc/sudoers.d/020_apache_poweroff from template
|
||||||
template:
|
template:
|
||||||
|
@ -80,7 +97,7 @@
|
||||||
when: not apache_allow_sudo
|
when: not apache_allow_sudo
|
||||||
|
|
||||||
|
|
||||||
- name: Run /usr/bin/iiab-refresh-wiki-docs (scraper script) to create http://box/info offline documentation. (This script was installed in Stage 3 = roles/3-base-server/tasks/main.yml, which ran roles/www_back_end/tasks/main.yml)
|
- name: Run /usr/bin/iiab-refresh-wiki-docs (scraper script) to create http://box/info offline documentation. (This script was installed in Stage 3 = roles/3-base-server/tasks/main.yml, which ran roles/www_base/tasks/main.yml)
|
||||||
command: /usr/bin/iiab-refresh-wiki-docs
|
command: /usr/bin/iiab-refresh-wiki-docs
|
||||||
when: internet_available and not nodocs
|
when: internet_available and not nodocs
|
||||||
|
|
||||||
|
@ -98,14 +115,14 @@
|
||||||
when: nginx_enabled | bool
|
when: nginx_enabled | bool
|
||||||
|
|
||||||
|
|
||||||
# RECORD www_front_end AS INSTALLED
|
# RECORD www_options AS INSTALLED
|
||||||
|
|
||||||
- name: "Set 'www_front_end_installed: True'"
|
- name: "Set 'www_options_installed: True'"
|
||||||
set_fact:
|
set_fact:
|
||||||
www_front_end_installed: True
|
www_options_installed: True
|
||||||
|
|
||||||
- name: "Add 'www_front_end_installed: True' to {{ iiab_state_file }}"
|
- name: "Add 'www_options_installed: True' to {{ iiab_state_file }}"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml
|
path: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml
|
||||||
regexp: '^www_front_end_installed'
|
regexp: '^www_options_installed'
|
||||||
line: 'www_front_end_installed: True'
|
line: 'www_options_installed: True'
|
|
@ -56,6 +56,12 @@ else
|
||||||
XO_VERSION="none"
|
XO_VERSION="none"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f /proc/device-tree/model ]; then
|
||||||
|
RPI_VERSION=`cat /proc/device-tree/model`
|
||||||
|
else
|
||||||
|
RPI_VERSION="none"
|
||||||
|
fi
|
||||||
|
|
||||||
ANSIBLE_VERSION=$(ansible --version|head -n 1|cut -f 2 -d " ")
|
ANSIBLE_VERSION=$(ansible --version|head -n 1|cut -f 2 -d " ")
|
||||||
|
|
||||||
if [ ! x$DHCPCD_PATH = x ]; then
|
if [ ! x$DHCPCD_PATH = x ]; then
|
||||||
|
@ -77,6 +83,7 @@ cat <<EOF
|
||||||
"iiab_branch" : "$BRANCH",
|
"iiab_branch" : "$BRANCH",
|
||||||
"iiab_commit" : "$COMMIT",
|
"iiab_commit" : "$COMMIT",
|
||||||
"xo_model" : "$XO_VERSION",
|
"xo_model" : "$XO_VERSION",
|
||||||
|
"rpi_model" : "$RPI_VERSION",
|
||||||
"ansible_version" : "$ANSIBLE_VERSION",
|
"ansible_version" : "$ANSIBLE_VERSION",
|
||||||
"os" : "$OS",
|
"os" : "$OS",
|
||||||
"os_ver" : "$OS_VER"}
|
"os_ver" : "$OS_VER"}
|
||||||
|
|
|
@ -73,8 +73,8 @@
|
||||||
- { role: usb_lib }
|
- { role: usb_lib }
|
||||||
- { role: vnstat }
|
- { role: vnstat }
|
||||||
- { role: wordpress }
|
- { role: wordpress }
|
||||||
- { role: www_back_end }
|
- { role: www_base }
|
||||||
- { role: www_front_end }
|
- { role: www_options }
|
||||||
- { role: yarn }
|
- { role: yarn }
|
||||||
#- { roles: xovis }
|
#- { roles: xovis }
|
||||||
|
|
||||||
|
|
|
@ -251,11 +251,11 @@ nginx_interface: 0.0.0.0
|
||||||
nginx_conf_dir: /etc/nginx/conf.d
|
nginx_conf_dir: /etc/nginx/conf.d
|
||||||
nginx_log_dir: /var/log/nginx
|
nginx_log_dir: /var/log/nginx
|
||||||
#
|
#
|
||||||
# For schools that use WordPress/Nextcloud/Moodle intensively:
|
# For schools that use WordPress/Nextcloud/Moodle/PBX intensively:
|
||||||
nginx_high_php_limits: False
|
nginx_high_php_limits: False
|
||||||
# WARNING: Enabling this might cause excess use of RAM/disk or other resources!
|
# WARNING: Enabling this might cause excess use of RAM/disk or other resources!
|
||||||
# SO AFTER INSTALLING IIAB, VERIFY THAT THESE 5 SETTINGS...
|
# SO AFTER INSTALLING IIAB, VERIFY THAT THESE 5 SETTINGS...
|
||||||
# https://github.com/iiab/iiab/blob/master/roles/www_back_end/tasks/main.yml#L23-L27
|
# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/main.yml#L53-L67
|
||||||
# ...ARE SUITABLE FOR YOUR HARDWARE, for: /etc/php/<VERSION>/fpm/php.ini
|
# ...ARE SUITABLE FOR YOUR HARDWARE, for: /etc/php/<VERSION>/fpm/php.ini
|
||||||
|
|
||||||
# See also Apache vars {default_language, language_priority} @ top of this file
|
# See also Apache vars {default_language, language_priority} @ top of this file
|
||||||
|
@ -702,7 +702,6 @@ is_raspbian: False # Covers RPi HW and non-RPi HW versions of Raspbian
|
||||||
is_raspbian_10: False
|
is_raspbian_10: False
|
||||||
is_raspbian_9: False
|
is_raspbian_9: False
|
||||||
is_raspbian_8: False
|
is_raspbian_8: False
|
||||||
is_rpi: False # 2019-03-23: Doesn't yet test for RPi HW, but hopefully soon: https://github.com/iiab/iiab/issues/1406
|
|
||||||
|
|
||||||
is_redhat: False # Not well supported as of 2019, see: https://github.com/iiab/iiab/issues/1434
|
is_redhat: False # Not well supported as of 2019, see: https://github.com/iiab/iiab/issues/1434
|
||||||
is_centos: False
|
is_centos: False
|
||||||
|
|
|
@ -138,11 +138,11 @@ pi_swap_file_size: 1024
|
||||||
|
|
||||||
# roles/mysql runs here (mandatory)
|
# roles/mysql runs here (mandatory)
|
||||||
|
|
||||||
# For schools that use WordPress/Nextcloud/Moodle intensively:
|
# For schools that use WordPress/Nextcloud/Moodle/PBX intensively:
|
||||||
nginx_high_php_limits: False
|
nginx_high_php_limits: False
|
||||||
# WARNING: Enabling this might cause excess use of RAM/disk or other resources!
|
# WARNING: Enabling this might cause excess use of RAM/disk or other resources!
|
||||||
# SO AFTER INSTALLING IIAB, VERIFY THAT THESE 5 SETTINGS...
|
# SO AFTER INSTALLING IIAB, VERIFY THAT THESE 5 SETTINGS...
|
||||||
# https://github.com/iiab/iiab/blob/master/roles/www_back_end/tasks/main.yml#L23-L27
|
# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/main.yml#L53-L67
|
||||||
# ...ARE SUITABLE FOR YOUR HARDWARE, for: /etc/php/<VERSION>/fpm/php.ini
|
# ...ARE SUITABLE FOR YOUR HARDWARE, for: /etc/php/<VERSION>/fpm/php.ini
|
||||||
|
|
||||||
# See also Apache vars {default_language, language_priority} @ top of this file
|
# See also Apache vars {default_language, language_priority} @ top of this file
|
||||||
|
|
|
@ -138,11 +138,11 @@ pi_swap_file_size: 1024
|
||||||
|
|
||||||
# roles/mysql runs here (mandatory)
|
# roles/mysql runs here (mandatory)
|
||||||
|
|
||||||
# For schools that use WordPress/Nextcloud/Moodle intensively:
|
# For schools that use WordPress/Nextcloud/Moodle/PBX intensively:
|
||||||
nginx_high_php_limits: False
|
nginx_high_php_limits: False
|
||||||
# WARNING: Enabling this might cause excess use of RAM/disk or other resources!
|
# WARNING: Enabling this might cause excess use of RAM/disk or other resources!
|
||||||
# SO AFTER INSTALLING IIAB, VERIFY THAT THESE 5 SETTINGS...
|
# SO AFTER INSTALLING IIAB, VERIFY THAT THESE 5 SETTINGS...
|
||||||
# https://github.com/iiab/iiab/blob/master/roles/www_back_end/tasks/main.yml#L23-L27
|
# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/main.yml#L53-L67
|
||||||
# ...ARE SUITABLE FOR YOUR HARDWARE, for: /etc/php/<VERSION>/fpm/php.ini
|
# ...ARE SUITABLE FOR YOUR HARDWARE, for: /etc/php/<VERSION>/fpm/php.ini
|
||||||
|
|
||||||
# See also Apache vars {default_language, language_priority} @ top of this file
|
# See also Apache vars {default_language, language_priority} @ top of this file
|
||||||
|
|
|
@ -138,11 +138,11 @@ pi_swap_file_size: 1024
|
||||||
|
|
||||||
# roles/mysql runs here (mandatory)
|
# roles/mysql runs here (mandatory)
|
||||||
|
|
||||||
# For schools that use WordPress/Nextcloud/Moodle intensively:
|
# For schools that use WordPress/Nextcloud/Moodle/PBX intensively:
|
||||||
nginx_high_php_limits: False
|
nginx_high_php_limits: False
|
||||||
# WARNING: Enabling this might cause excess use of RAM/disk or other resources!
|
# WARNING: Enabling this might cause excess use of RAM/disk or other resources!
|
||||||
# SO AFTER INSTALLING IIAB, VERIFY THAT THESE 5 SETTINGS...
|
# SO AFTER INSTALLING IIAB, VERIFY THAT THESE 5 SETTINGS...
|
||||||
# https://github.com/iiab/iiab/blob/master/roles/www_back_end/tasks/main.yml#L23-L27
|
# https://github.com/iiab/iiab/blob/master/roles/www_options/tasks/main.yml#L53-L67
|
||||||
# ...ARE SUITABLE FOR YOUR HARDWARE, for: /etc/php/<VERSION>/fpm/php.ini
|
# ...ARE SUITABLE FOR YOUR HARDWARE, for: /etc/php/<VERSION>/fpm/php.ini
|
||||||
|
|
||||||
# See also Apache vars {default_language, language_priority} @ top of this file
|
# See also Apache vars {default_language, language_priority} @ top of this file
|
||||||
|
|
|
@ -3,7 +3,6 @@ is_debian: True
|
||||||
is_debian_10: True
|
is_debian_10: True
|
||||||
is_raspbian: True
|
is_raspbian: True
|
||||||
is_raspbian_10: True
|
is_raspbian_10: True
|
||||||
is_rpi: True
|
|
||||||
rtc_id: ds3231
|
rtc_id: ds3231
|
||||||
|
|
||||||
# 2019-03-23: These apply if-only-if named_install and/or dhcpd_install are True
|
# 2019-03-23: These apply if-only-if named_install and/or dhcpd_install are True
|
||||||
|
@ -39,5 +38,6 @@ calibre_via_python: False
|
||||||
minetest_server_bin: /library/games/minetest/bin/minetestserver
|
minetest_server_bin: /library/games/minetest/bin/minetestserver
|
||||||
minetest_working_dir: /library/games/minetest
|
minetest_working_dir: /library/games/minetest
|
||||||
minetest_game_dir: /library/games/minetest/games/minetest_game
|
minetest_game_dir: /library/games/minetest/games/minetest_game
|
||||||
minetest_rpi_src_url: http://www.nathansalapat.com/downloads/0.4.17.1.tar.gz
|
minetest_rpi_src_tar: minetest.5.1.1.tar.gz
|
||||||
minetest_rpi_src: minetest-0.4.17.1.tar.gz
|
minetest_rpi_src_url: "http://www.nathansalapat.com/downloads/{{ minetest_rpi_src_tar }}"
|
||||||
|
minetest_rpi_src_untarred: Minetest
|
||||||
|
|
|
@ -3,7 +3,6 @@ is_debian: True
|
||||||
is_debian_8: True
|
is_debian_8: True
|
||||||
is_raspbian: True
|
is_raspbian: True
|
||||||
is_raspbian_8: True
|
is_raspbian_8: True
|
||||||
is_rpi: True
|
|
||||||
rtc_id: ds3231
|
rtc_id: ds3231
|
||||||
|
|
||||||
# 2019-01-31: These apply if-only-if named_install and/or dhcpd_install are True
|
# 2019-01-31: These apply if-only-if named_install and/or dhcpd_install are True
|
||||||
|
|
|
@ -3,7 +3,6 @@ is_debian: True
|
||||||
is_debian_9: True
|
is_debian_9: True
|
||||||
is_raspbian: True
|
is_raspbian: True
|
||||||
is_raspbian_9: True
|
is_raspbian_9: True
|
||||||
is_rpi: True
|
|
||||||
rtc_id: ds3231
|
rtc_id: ds3231
|
||||||
|
|
||||||
# 2019-01-31: These apply if-only-if named_install and/or dhcpd_install are True
|
# 2019-01-31: These apply if-only-if named_install and/or dhcpd_install are True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue