mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
commit
1888b4eaca
14 changed files with 83 additions and 73 deletions
|
@ -63,10 +63,3 @@
|
|||
- usbutils
|
||||
- wget
|
||||
state: present
|
||||
|
||||
# 2019-10-31: roles/kalite crashed without the following python-virtualenv -- weirdly python3-virtualenv was installed on Raspbian (not sure why) but insufficient
|
||||
- name: Install package python-virtualenv for KA Lite and Calibre-Web, on older OS's (raspbian-9, raspbian-10, debian-9, debian-10, ubuntu-16, ubuntu-18)
|
||||
package:
|
||||
name: python-virtualenv
|
||||
state: present
|
||||
when: is_raspbian_9 or is_raspbian_10 or is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_18
|
||||
|
|
|
@ -23,28 +23,18 @@
|
|||
when: squid_install | bool
|
||||
tags: base, squid, network, domain
|
||||
|
||||
# until porting is complete
|
||||
- name: Install python
|
||||
package:
|
||||
name: python
|
||||
state: present
|
||||
|
||||
- name: Create a Python interface to iiab.env
|
||||
template:
|
||||
src: roles/1-prep/templates/iiab_env.py.j2
|
||||
dest: /etc/iiab/iiab_env.py
|
||||
|
||||
- name: Installing captive portal
|
||||
include_tasks: roles/captive-portal/tasks/main.yml
|
||||
when: captive_portal_install | bool
|
||||
tags: base, captive-portal, network, domain
|
||||
|
||||
- name: Install Bluetooth - only on Raspberry Pi
|
||||
include_role:
|
||||
name: bluetooth
|
||||
when: is_rpi and bluetooth_install
|
||||
tags: bluetooth
|
||||
|
||||
- name: USB-LIB
|
||||
include_role:
|
||||
name: usb-lib
|
||||
when: usb_lib_install | bool
|
||||
tags: usb-lib
|
||||
|
||||
# NETWORK moved to the very end, after Stage 9 (9-LOCAL-ADDONS)
|
||||
# It can also be run manually using: cd /opt/iiab/iiab; ./iiab-network
|
||||
#
|
||||
|
@ -67,13 +57,6 @@
|
|||
when: postgresql_install | bool
|
||||
tags: postgresql, pathagar, moodle
|
||||
|
||||
# UNMAINTAINED
|
||||
- name: AUTHSERVER
|
||||
include_role:
|
||||
name: authserver
|
||||
when: authserver_install is defined and authserver_install
|
||||
tags: olpc, authserver
|
||||
|
||||
- name: CUPS
|
||||
include_role:
|
||||
name: cups
|
||||
|
@ -86,12 +69,6 @@
|
|||
when: samba_install | bool
|
||||
tags: samba
|
||||
|
||||
- name: USB-LIB
|
||||
include_role:
|
||||
name: usb-lib
|
||||
when: usb_lib_install | bool
|
||||
tags: usb-lib
|
||||
|
||||
- name: Run /usr/bin/iiab-refresh-wiki-docs (scraper script) to create http://box/info offline documentation. (This script was installed at the beginning of Stage 3 = roles/3-base-server/tasks/main.yml, which ran Apache playbook = roles/httpd/tasks/main.yml)
|
||||
command: /usr/bin/iiab-refresh-wiki-docs
|
||||
when: internet_available and not nodocs
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
when: mediawiki_install | bool
|
||||
tags: mediawiki
|
||||
|
||||
# UNMAINTAINED
|
||||
- name: EJABBERD
|
||||
include_role:
|
||||
name: ejabberd
|
||||
|
|
|
@ -33,33 +33,12 @@
|
|||
when: phpmyadmin_install | bool
|
||||
tags: phpmyadmin
|
||||
|
||||
# UNMAINTAINED
|
||||
- name: SUGAR-STATS
|
||||
include_role:
|
||||
name: sugar-stats
|
||||
when: sugar_stats_install is defined and sugar_stats_install and ansible_distribution != "CentOS"
|
||||
tags: olpc, sugar-stats
|
||||
|
||||
# UNMAINTAINED
|
||||
- name: TEAMVIEWER
|
||||
include_role:
|
||||
name: teamviewer
|
||||
when: teamviewer_install is defined and teamviewer_install
|
||||
tags: teamviewer
|
||||
|
||||
- name: VNSTAT
|
||||
include_role:
|
||||
name: vnstat
|
||||
when: vnstat_install | bool
|
||||
tags: vnstat
|
||||
|
||||
# UNMAINTAINED
|
||||
- name: XOVIS
|
||||
include_role:
|
||||
name: xovis
|
||||
when: xovis_install is defined and xovis_install and ansible_distribution != "CentOS"
|
||||
tags: xovis
|
||||
|
||||
- name: Recording STAGE 8 HAS COMPLETED ======================
|
||||
lineinfile:
|
||||
dest: "{{ iiab_env_file }}"
|
||||
|
|
|
@ -9,6 +9,25 @@
|
|||
when: internetarchive_install | bool
|
||||
tags: internetarchive
|
||||
|
||||
# Until porting complete (@jvonau helping transition to Python 3)
|
||||
- name: 'Install Python 2.7 packages: python, python-pip'
|
||||
package:
|
||||
name:
|
||||
- python
|
||||
- python-pip # Used by Admin Console
|
||||
state: present
|
||||
|
||||
# Used by iiab-update-map, supplied by osm-vector-maps
|
||||
- name: Create a Python interface to iiab.env
|
||||
template:
|
||||
src: roles/1-prep/templates/iiab_env.py.j2
|
||||
dest: /etc/iiab/iiab_env.py
|
||||
|
||||
- name: CAPTIVE PORTAL
|
||||
include_tasks: roles/captive-portal/tasks/main.yml
|
||||
when: captive_portal_install | bool
|
||||
tags: base, captive-portal, network, domain
|
||||
|
||||
- name: MINETEST
|
||||
include_role:
|
||||
name: minetest
|
||||
|
|
|
@ -124,7 +124,7 @@
|
|||
enabled: yes
|
||||
when: mysql_enabled | bool
|
||||
|
||||
- name: Install .my.cnf file from template, with root password credentials, if mysql_enabled
|
||||
- name: Install /root/.my.cnf file from template, with root password credentials, if mysql_enabled
|
||||
template:
|
||||
src: my.cnf.j2
|
||||
dest: /root/.my.cnf
|
||||
|
|
|
@ -74,9 +74,11 @@ elif [ -f /etc/debian_version ]; then # Includes Debian, Ubuntu & Raspbian
|
|||
echo -e '\nIF YOU FACE ERROR "signatures couldn'"'"'t be verified because the public key is not available" THEN REPEATEDLY RE-RUN "sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 93C4A3FD7BB9C367"\n'
|
||||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 93C4A3FD7BB9C367
|
||||
|
||||
echo -e "\napt update; apt install ansible and python3 dependencies\n"
|
||||
echo -e "\napt update; apt install ansible and python3 dependencies explained at:"
|
||||
echo -e "https://github.com/iiab/iiab/tree/master/scripts/ansible.md\n"
|
||||
apt update
|
||||
apt -y --allow-downgrades install ansible python3-distutils python3-mysqldb python3-passlib python3-pip python3-setuptools python3-virtualenv python3-psycopg2
|
||||
apt -y --allow-downgrades install ansible python3-pymysql python3-psycopg2 \
|
||||
python3-passlib python3-pip python3-setuptools virtualenv
|
||||
|
||||
echo -e "\nSUCCESS: verify Ansible using 'ansible --version' and/or 'apt -a list ansible'\n\n"
|
||||
|
||||
|
@ -93,7 +95,7 @@ elif [ -f /etc/debian_version ]; then # Includes Debian, Ubuntu & Raspbian
|
|||
echo -e "successfully saved to /etc/apt/sources.list.d/iiab-ansible.list\n"
|
||||
|
||||
echo -e "IF *OTHER* ANSIBLE SOURCES APPEAR BELOW, PLEASE MANUALLY REMOVE THEM TO"
|
||||
echo -e "ENSURE ANSIBLE UPDATES CLEANLY: (then re-run this script to be sure!)\n"
|
||||
echo -e 'ENSURE ANSIBLE UPDATES CLEANLY: (then re-run this script to be sure!)\n'
|
||||
grep '^deb .*ansible' /etc/apt/sources.list /etc/apt/sources.list.d/*.list | grep -v '^/etc/apt/sources.list.d/iiab-ansible.list:' || true # Override bash -e (instead of aborting at 1st error)
|
||||
else
|
||||
echo -e "\nEXITING: Could not detect your OS (unsupported?)\n"
|
||||
|
|
|
@ -74,9 +74,12 @@ elif [ -f /etc/debian_version ]; then # Includes Debian, Ubuntu & Raspbian
|
|||
echo -e '\nIF YOU FACE ERROR "signatures couldn'"'"'t be verified because the public key is not available" THEN REPEATEDLY RE-RUN "sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 93C4A3FD7BB9C367"\n'
|
||||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 93C4A3FD7BB9C367
|
||||
|
||||
echo -e "\napt update; apt install ansible and python3 dependencies\n"
|
||||
echo -e "\napt update; apt install ansible and python3 dependencies explained at:"
|
||||
echo -e "https://github.com/iiab/iiab/tree/master/scripts/ansible.md\n"
|
||||
apt update
|
||||
apt -y --allow-downgrades install ansible python3-distutils python3-mysqldb python3-passlib python3-pip python3-setuptools python3-virtualenv python3-psycopg2
|
||||
apt -y --allow-downgrades install ansible python3-pymysql python3-psycopg2 \
|
||||
python3-passlib python3-pip python3-setuptools virtualenv
|
||||
|
||||
echo -e "\nSUCCESS: verify Ansible using 'ansible --version' and/or 'apt -a list ansible'\n\n"
|
||||
|
||||
# TEMPORARILY USE ANSIBLE 2.4.4 (REMOVE IT WITH "pip uninstall ansible")
|
||||
|
@ -92,7 +95,7 @@ elif [ -f /etc/debian_version ]; then # Includes Debian, Ubuntu & Raspbian
|
|||
echo -e "successfully saved to /etc/apt/sources.list.d/iiab-ansible.list\n"
|
||||
|
||||
echo -e "IF *OTHER* ANSIBLE SOURCES APPEAR BELOW, PLEASE MANUALLY REMOVE THEM TO"
|
||||
echo -e "ENSURE ANSIBLE UPDATES CLEANLY: (then re-run this script to be sure!)\n"
|
||||
echo -e 'ENSURE ANSIBLE UPDATES CLEANLY: (then re-run this script to be sure!)\n'
|
||||
grep '^deb .*ansible' /etc/apt/sources.list /etc/apt/sources.list.d/*.list | grep -v '^/etc/apt/sources.list.d/iiab-ansible.list:' || true # Override bash -e (instead of aborting at 1st error)
|
||||
else
|
||||
echo -e "\nEXITING: Could not detect your OS (unsupported?)\n"
|
||||
|
|
|
@ -74,9 +74,12 @@ elif [ -f /etc/debian_version ]; then # Includes Debian, Ubuntu & Raspbian
|
|||
echo -e '\nIF YOU FACE ERROR "signatures couldn'"'"'t be verified because the public key is not available" THEN REPEATEDLY RE-RUN "sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 93C4A3FD7BB9C367"\n'
|
||||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 93C4A3FD7BB9C367
|
||||
|
||||
echo -e "\napt update; apt install ansible and python3 dependencies\n"
|
||||
echo -e "\napt update; apt install ansible and python3 dependencies explained at:"
|
||||
echo -e "https://github.com/iiab/iiab/tree/master/scripts/ansible.md\n"
|
||||
apt update
|
||||
apt -y --allow-downgrades install ansible python3-distutils python3-mysqldb python3-passlib python3-pip python3-setuptools python3-virtualenv python3-psycopg2
|
||||
apt -y --allow-downgrades install ansible python3-pymysql python3-psycopg2 \
|
||||
python3-passlib python3-pip python3-setuptools virtualenv
|
||||
|
||||
echo -e "\nSUCCESS: verify Ansible using 'ansible --version' and/or 'apt -a list ansible'\n\n"
|
||||
|
||||
# TEMPORARILY USE ANSIBLE 2.4.4 (REMOVE IT WITH "pip uninstall ansible")
|
||||
|
@ -92,7 +95,7 @@ elif [ -f /etc/debian_version ]; then # Includes Debian, Ubuntu & Raspbian
|
|||
echo -e "successfully saved to /etc/apt/sources.list.d/iiab-ansible.list\n"
|
||||
|
||||
echo -e "IF *OTHER* ANSIBLE SOURCES APPEAR BELOW, PLEASE MANUALLY REMOVE THEM TO"
|
||||
echo -e "ENSURE ANSIBLE UPDATES CLEANLY: (then re-run this script to be sure!)\n"
|
||||
echo -e 'ENSURE ANSIBLE UPDATES CLEANLY: (then re-run this script to be sure!)\n'
|
||||
grep '^deb .*ansible' /etc/apt/sources.list /etc/apt/sources.list.d/*.list | grep -v '^/etc/apt/sources.list.d/iiab-ansible.list:' || true # Override bash -e (instead of aborting at 1st error)
|
||||
else
|
||||
echo -e "\nEXITING: Could not detect your OS (unsupported?)\n"
|
||||
|
|
29
scripts/ansible.md
Normal file
29
scripts/ansible.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
Please read "What is Ansible and what version should I use?" at [http://FAQ.IIAB.IO](http://FAQ.IIAB.IO)
|
||||
|
||||
Read https://github.com/iiab/iiab/wiki/IIAB-Contributors-Guide#ansible to learn more about how IIAB uses Ansible.
|
||||
|
||||
Starting in November 2019, IIAB's Ansible installer ([/opt/iiab/iiab/scripts/ansible](https://github.com/iiab/iiab/blob/master/scripts/ansible)) began installing these python3-* apt packages, in support of the following Ansible modules:
|
||||
|
||||
1. Ansible module: [pip](https://docs.ansible.com/ansible/latest/modules/pip_module.html)
|
||||
|
||||
IIAB installs apt packages:
|
||||
- **python3-pip** (for IIAB's [Admin Console](https://github.com/iiab/iiab-admin-console))
|
||||
- **python3-setuptools**
|
||||
- **virtualenv** (is Python 3 only, for [roles/kalite](https://github.com/iiab/iiab/tree/master/roles/kalite) & [roles/calibre-web](https://github.com/iiab/iiab/tree/master/roles/calibre-web) ?) and pulls in additional packages... (`apt show virtualenv` shows "Depends: python3, python3-virtualenv")
|
||||
- **python3-virtualenv** and pulls in additional package... (`apt show python3-virtualenv` shows "Depends: python-pip-whl (>= 8.1.1-2), python3, python3-distutils, python3-pkg-resources")
|
||||
- **python3-distutils**
|
||||
|
||||
2. Ansible modules: [mysql_db](https://docs.ansible.com/ansible/latest/modules/mysql_db_module.html) and [mysql_user](https://docs.ansible.com/ansible/latest/modules/mysql_user_module.html) (for [roles/mysql](https://github.com/iiab/iiab/tree/master/roles/mysql))
|
||||
|
||||
IIAB installs apt package:
|
||||
- **python3-pymysql** (see sudo's password-changing failure [iiab/iiab#1714](https://github.com/iiab/iiab/issues/1714) and [ansible/ansible#47736](https://github.com/ansible/ansible/issues/47736))
|
||||
|
||||
3. Ansible modules: [postgresql_db](https://docs.ansible.com/ansible/latest/modules/postgresql_db_module.html) and [postgresql_dbuser](https://docs.ansible.com/ansible/latest/modules/postgresql_user_module.html)
|
||||
|
||||
IIAB installs apt package:
|
||||
- **python3-psycopg2** (for [roles/moodle](https://github.com/iiab/iiab/tree/master/roles/moodle))
|
||||
|
||||
4. Ansible module: [htpasswd](https://docs.ansible.com/ansible/latest/modules/htpasswd_module.html)
|
||||
|
||||
IIAB installs apt package:
|
||||
- **python3-passlib** (for [roles/munin](https://github.com/iiab/iiab/tree/master/roles/munin))
|
|
@ -316,6 +316,7 @@ dokuwiki_enabled: False
|
|||
mediawiki_install: False
|
||||
mediawiki_enabled: False
|
||||
|
||||
# Unmaintained as of November 2019
|
||||
ejabberd_install: False
|
||||
ejabberd_enabled: False
|
||||
|
||||
|
@ -538,10 +539,6 @@ calibreweb_home: "{{ content_base }}/calibre-web" # /library/calibre-web
|
|||
# =============================================================================
|
||||
# UNMAINTAINED LEGACY VARIABLES: YOU'RE TAKING BIG RISKS IF YOU USE ANY HERE...
|
||||
|
||||
# Unmaintained
|
||||
# authserver_install: False
|
||||
# authserver_enabled: False
|
||||
|
||||
# CONSIDER THESE NEW OPENSTREETMAP (OSM) APPROACHES INSTEAD:
|
||||
#
|
||||
# 2019: https://github.com/iiab/iiab/wiki/IIAB-Maps SEE ABOVE osm_vector_maps_*
|
||||
|
@ -559,9 +556,13 @@ calibreweb_home: "{{ content_base }}/calibre-web" # /library/calibre-web
|
|||
# docker_install: False
|
||||
# docker_enabled: False
|
||||
|
||||
# THOSE ABOVE WERE STILL OCCASIONALLY USED AS OF SEPTEMBER 2019.
|
||||
# THOSE ABOVE WERE STILL OCCASIONALLY USED AS OF NOVEMBER 2019.
|
||||
# =============================================================================
|
||||
# THOSE BELOW WERE *NOT* USED FOR YEARS, AS OF SEPTEMBER 2019.
|
||||
# THOSE BELOW WERE *NOT* USED FOR YEARS, AS OF NOVEMBER 2019.
|
||||
|
||||
# Unmaintained
|
||||
# authserver_install: False
|
||||
# authserver_enabled: False
|
||||
|
||||
# Unmaintained (better to install from http://teamviewer.com or prep scripts at http://download.iiab.io)
|
||||
# teamviewer_install: False
|
||||
|
|
|
@ -209,6 +209,7 @@ dokuwiki_enabled: True
|
|||
mediawiki_install: True
|
||||
mediawiki_enabled: True
|
||||
|
||||
# Unmaintained as of November 2019
|
||||
ejabberd_install: False
|
||||
ejabberd_enabled: False
|
||||
|
||||
|
|
|
@ -209,6 +209,7 @@ dokuwiki_enabled: False
|
|||
mediawiki_install: False
|
||||
mediawiki_enabled: False
|
||||
|
||||
# Unmaintained as of November 2019
|
||||
ejabberd_install: False
|
||||
ejabberd_enabled: False
|
||||
|
||||
|
|
|
@ -209,6 +209,7 @@ dokuwiki_enabled: False
|
|||
mediawiki_install: False
|
||||
mediawiki_enabled: False
|
||||
|
||||
# Unmaintained as of November 2019
|
||||
ejabberd_install: False
|
||||
ejabberd_enabled: False
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue