1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-15 04:32:11 +00:00

Merge pull request #311 from jvonau/fix_2025

sync from jvonau:fix_2025
This commit is contained in:
A Holt 2019-11-03 09:46:06 -05:00 committed by GitHub
commit 1ac9866ec1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 82 additions and 55 deletions

View file

@ -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

View file

@ -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
#
@ -68,11 +58,11 @@
tags: postgresql, pathagar, moodle
# UNMAINTAINED
- name: AUTHSERVER
include_role:
name: authserver
when: authserver_install is defined and authserver_install
tags: olpc, authserver
#- name: AUTHSERVER
# include_role:
# name: authserver
# when: authserver_install is defined and authserver_install
# tags: olpc, authserver
- name: CUPS
include_role:
@ -86,12 +76,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

View file

@ -21,6 +21,7 @@
when: mediawiki_install | bool
tags: mediawiki
# unmaintained
- name: EJABBERD
include_role:
name: ejabberd

View file

@ -34,18 +34,18 @@
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
#- 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: TEAMVIEWER
# include_role:
# name: teamviewer
# when: teamviewer_install is defined and teamviewer_install
# tags: teamviewer
- name: VNSTAT
include_role:
@ -54,11 +54,11 @@
tags: vnstat
# UNMAINTAINED
- name: XOVIS
include_role:
name: xovis
when: xovis_install is defined and xovis_install and ansible_distribution != "CentOS"
tags: xovis
#- 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:

View file

@ -9,6 +9,25 @@
when: internetarchive_install | bool
tags: internetarchive
# until porting is complete
- name: Install python-2.7
package:
name:
- python
- python-pip
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: Installing 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

View file

@ -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"

View file

@ -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"
# TEMPORARILY USE ANSIBLE 2.4.4 (REMOVE IT WITH "pip uninstall ansible")

View file

@ -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"
# TEMPORARILY USE ANSIBLE 2.4.4 (REMOVE IT WITH "pip uninstall ansible")

24
scripts/ansible.md Normal file
View file

@ -0,0 +1,24 @@
In order to use optional modules that ansible is capable of the libraries
need to be installed, we make use of the following ansible modules:
1. pip: we install python3-pip python3-setuptools virtualenv
as per https://docs.ansible.com/ansible/latest/modules/pip_module.html
virtualenv is python3 only and pulls in python3-distutils python3-virtualenv
`apt show virtualenv` Depends: python3, python3-virtualenv
`apt show python3-virtualenv` Depends: python-pip-whl (>= 8.1.1-2), python3, python3-distutils, python3-pkg-resources
2. mysql_db: python3-pymysql
https://docs.ansible.com/ansible/latest/modules/mysql_db_module.html#mysql-db-module
3. mysql_user: python3-pymysql
https://docs.ansible.com/ansible/latest/modules/mysql_user_module.html#mysql-user-module
https://github.com/ansible/ansible/issues/47736
4. postgresql_db: python3-psycopg2
https://docs.ansible.com/ansible/latest/modules/postgresql_db_module.html#postgresql-db-module
5. postgresql_dbuser: python3-psycopg2
https://docs.ansible.com/ansible/latest/modules/postgresql_user_module.html#postgresql-user-module
6. htpasswd: python3-passlib
https://docs.ansible.com/ansible/latest/modules/htpasswd_module.html?highlight=htpasswd