mirror of
https://github.com/iiab/iiab.git
synced 2025-02-14 12:12:12 +00:00
Test (#20)
* change apache_data to apache_user in all * no libapach2 in centos. just php. no php-magick in centos * remove redundant vars entries * do not create apache user * missed one pound sign * soft code all references to apache_user * centos requires older setuptools * revert ansible_lsb.id in xsce.yml * try getting recent pip * move pip download to 2prep so that kalite success is not dependent on iiab coming first * still need to replace setuptools in kalite * add curl -- needed in debian * massivly substitue iiab for xsce, and rename files * completed runansible * centos fixes,install pip * appliance means no iptables rules * change to earlier version of setuptools for centos * delete file duplicate, hopefully unnecessary. generate the offline docs * wiki docs errors * create the admin group -- deleted earlier * use the --yes option with pip uninstall * base of repo moved from schoolserver to iiab, unleashkids.org->iiab.io * network detection broken due to tupo
This commit is contained in:
parent
6ef68cc480
commit
f319afa432
179 changed files with 978 additions and 672 deletions
|
@ -34,8 +34,8 @@ Please read the `installation`_ documentation.
|
|||
|
||||
See the `XSCE project`_ for more information about the project.
|
||||
|
||||
.. _XSCE wiki: https://github.com/XSCE/xsce/wiki
|
||||
.. _installation: https://github.com/XSCE/xsce/wiki/XSCE-Installation
|
||||
.. _XSCE wiki: https://github.com/XSCE/iiab/wiki
|
||||
.. _installation: https://github.com/XSCE/iiab/wiki/XSCE-Installation
|
||||
.. _ansible: http://www.ansibleworks.com/
|
||||
.. _ansible documentation: http://www.ansibleworks.com/docs/
|
||||
.. _XSCE project: http://schoolserver.org/
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
# iiab
|
||||
Internet in a Box - NEW VERSION orig from http://github.com/xsce
|
||||
Internet in a Box - NEW VERSION orig from http://github.com/iiab
|
||||
|
|
|
@ -50,4 +50,4 @@ There are three main methods of installing this software:
|
|||
|
||||
In each case you need hardware that has been assembled, but with nothing installed on it.
|
||||
|
||||
Detailed instructions on each of these methods is at https://github.com/XSCE/xsce/wiki/XSCE-Installation.
|
||||
Detailed instructions on each of these methods is at https://github.com/XSCE/iiab/wiki/XSCE-Installation.
|
||||
|
|
|
@ -21,7 +21,7 @@ If you want to enable a service, you must browse to http://schoolserver.lan/admi
|
|||
|
||||
**How Do I Install 6.1?**
|
||||
|
||||
The install instructions have not changed much since release-6.0. Please refer to https://github.com/XSCE/xsce/wiki/XSCE-Installation for the overall process -- Noting the following:
|
||||
The install instructions have not changed much since release-6.0. Please refer to https://github.com/XSCE/iiab/wiki/XSCE-Installation for the overall process -- Noting the following:
|
||||
|
||||
* On FC22, add "yum" to the installs prior to running the ansible playbook i.e.
|
||||
```
|
||||
|
@ -29,8 +29,8 @@ The install instructions have not changed much since release-6.0. Please refer t
|
|||
cd /opt
|
||||
mkdir /opt/schoolserver
|
||||
cd schoolserver
|
||||
git clone https://github.com/XSCE/xsce --branch release-6.1 --depth 1
|
||||
cd xsce
|
||||
git clone https://github.com/XSCE/iiab --branch release-6.1 --depth 1
|
||||
cd iiab
|
||||
./install-console
|
||||
```
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- vars/default_vars.yml
|
||||
- vars/{{ ansible_distribution }}.yml
|
||||
- vars/local_vars.yml
|
||||
- /etc/xsce/config_vars.yml
|
||||
- /etc/iiab/config_vars.yml
|
||||
|
||||
roles:
|
||||
- { role: 1-prep, tags: ['prep','platform','base'] }
|
|
@ -6,7 +6,7 @@
|
|||
- vars/default_vars.yml
|
||||
- vars/{{ ansible_distribution }}.yml
|
||||
- vars/local_vars.yml
|
||||
- /etc/xsce/config_vars.yml
|
||||
- /etc/iiab/config_vars.yml
|
||||
|
||||
roles:
|
||||
- { role: 1-prep, tags: ['prep','platform','base'] }
|
37
iiab-network
Executable file
37
iiab-network
Executable file
|
@ -0,0 +1,37 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -f /etc/iiab/iiab.env ]
|
||||
then
|
||||
. /etc/iiab/iiab.env
|
||||
cd $XSCE_DIR
|
||||
else
|
||||
echo /etc/iiab/iiab.env is missing. Playbook has not been run.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f iiab-network.yml ]
|
||||
then
|
||||
echo "XSCE Playbook not found."
|
||||
echo "Please run this command from the top level of the git repo."
|
||||
echo "Exiting."
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ ! -f /etc/iiab/config_vars.yml ]
|
||||
then
|
||||
touch /etc/iiab/config_vars.yml
|
||||
fi
|
||||
|
||||
export ANSIBLE_LOG_PATH="$XSCE_DIR/iiab-network.log"
|
||||
ansible-playbook -i ansible_hosts iiab-network.yml --connection=local
|
||||
echo "" >> iiab-network.log
|
||||
ls -la /etc/sys*/net*/ifcfg* >> iiab-network.log
|
||||
if [ ! "OS" == "debian" ]; then
|
||||
nmcli d >> iiab-network.log
|
||||
nmcli c >> iiab-network.log
|
||||
fi
|
||||
brctl show >> iiab-network.log
|
||||
echo "run on:" >> iiab-network.log
|
||||
date >> iiab-network.log
|
||||
echo "" >> iiab-network.log
|
||||
echo "" >> iiab-network.log
|
|
@ -6,7 +6,7 @@
|
|||
- vars/default_vars.yml
|
||||
- vars/{{ ansible_distribution }}.yml
|
||||
- vars/local_vars.yml
|
||||
- /etc/xsce/config_vars.yml
|
||||
- /etc/iiab/config_vars.yml
|
||||
|
||||
roles:
|
||||
- { role: 1-prep, tags: ['prep','platform','base'] }
|
1
iiab.retry
Normal file
1
iiab.retry
Normal file
|
@ -0,0 +1 @@
|
|||
127.0.0.1
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
vars_files:
|
||||
- vars/default_vars.yml
|
||||
- vars/{{ ansible_lsb.id }}.yml
|
||||
- vars/{{ ansible_distribution}}.yml
|
||||
- vars/local_vars.yml
|
||||
- /etc/xsce/config_vars.yml
|
||||
- /etc/iiab/config_vars.yml
|
||||
|
||||
roles:
|
||||
- { role: 1-prep, tags: ['prep','platform','base'] }
|
|
@ -1,25 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
# copy var files to /etc/xsce for subsequent use
|
||||
# copy var files to /etc/iiab for subsequent use
|
||||
|
||||
#./install-init
|
||||
|
||||
# if not the first run, repo location is here
|
||||
|
||||
if [ -f /etc/xsce/xsce.env ]
|
||||
if [ -f /etc/iiab/iiab.env ]
|
||||
then
|
||||
. /etc/xsce/xsce.env
|
||||
. /etc/iiab/iiab.env
|
||||
cd $XSCE_DIR
|
||||
else
|
||||
XSCE_DIR=/opt/schoolserver/xsce
|
||||
mkdir -p /etc/xsce
|
||||
touch /etc/xsce/config_vars.yml
|
||||
XSCE_DIR=/opt/schoolserver/iiab
|
||||
mkdir -p /etc/iiab
|
||||
touch /etc/iiab/config_vars.yml
|
||||
fi
|
||||
|
||||
# don't track vars/local_vars.yml
|
||||
git update-index --assume-unchanged vars/local_vars.yml
|
||||
|
||||
PLAYBOOK="xsce-base.yml"
|
||||
PLAYBOOK="iiab-base.yml"
|
||||
INVENTORY="ansible_hosts"
|
||||
SELINUX_BEFORE=""
|
||||
SELINUX_AFTER=""
|
||||
|
@ -37,7 +37,7 @@ then
|
|||
SELINUX_BEFORE=`cat /etc/selinux/config | gawk -F= '/^SELINUX=/{ print $2 }'`
|
||||
fi
|
||||
|
||||
export ANSIBLE_LOG_PATH="$XSCE_DIR/xsce-install.log"
|
||||
export ANSIBLE_LOG_PATH="$XSCE_DIR/iiab-install.log"
|
||||
ansible-playbook -i $INVENTORY $PLAYBOOK --connection=local
|
||||
|
||||
if [ -f /etc/selinux/config ]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# use these as a tag a release at a point in time
|
||||
xsce_base_ver: 0
|
||||
iiab_base_ver: 0
|
||||
gui_version: 2
|
||||
NUC6_firmware_needed: False
|
||||
|
||||
|
@ -12,7 +12,7 @@ has_WAN: False
|
|||
wireless_lan_present: False
|
||||
udev_needs_patch: False
|
||||
strict_networking: False
|
||||
xsce_demo_mode: False
|
||||
iiab_demo_mode: False
|
||||
gw_active: False
|
||||
gui_static_wan: False
|
||||
has_internet_connection: False
|
||||
|
@ -36,9 +36,9 @@ wifi2: "not found-2"
|
|||
discovered_wan_iface: "none"
|
||||
discovered_lan_iface: "none"
|
||||
discovered_wireless_iface: "none"
|
||||
xsce_wireless_lan_iface: "none"
|
||||
xsce_lan_iface: "none"
|
||||
xsce_wan_iface: "none"
|
||||
iiab_wireless_lan_iface: "none"
|
||||
iiab_lan_iface: "none"
|
||||
iiab_wan_iface: "none"
|
||||
device_gw: "none"
|
||||
has_ifcfg_gw: "none"
|
||||
has_wifi_gw: "none"
|
||||
|
@ -50,8 +50,8 @@ ssid: XSCE
|
|||
hostapd_wait: 10
|
||||
gui_port: 80
|
||||
|
||||
# must keep roles/xsce-admin/defaults/main.yml sync'd
|
||||
admin_console_path: "{{ xsce_base }}/admin_console"
|
||||
cmdsrv_path: "{{ xsce_base }}/xsce_cmdsrv"
|
||||
xsce_cmdsrv_dbname : "xsce_cmdsrv.0.2.db"
|
||||
# must keep roles/iiab-admin/defaults/main.yml sync'd
|
||||
admin_console_path: "{{ iiab_base }}/admin_console"
|
||||
cmdsrv_path: "{{ iiab_base }}/iiab_cmdsrv"
|
||||
iiab_cmdsrv_dbname : "iiab_cmdsrv.0.2.db"
|
||||
wifi_id: none
|
||||
|
|
|
@ -8,17 +8,17 @@
|
|||
- set_fact:
|
||||
xo_model: '{{ ansible_local["local_facts"]["xo_model"] }}'
|
||||
phplib_dir: '{{ ansible_local["local_facts"]["phplib_dir"] }}'
|
||||
xsce_base_ver: '{{ ansible_local["local_facts"]["xsce_base_ver"] }}'
|
||||
xsce_preload: '{{ ansible_local["local_facts"]["xsce_preload"] }}'
|
||||
iiab_base_ver: '{{ ansible_local["local_facts"]["iiab_base_ver"] }}'
|
||||
iiab_preload: '{{ ansible_local["local_facts"]["iiab_preload"] }}'
|
||||
|
||||
- name: Defaulting xsce_base_ver
|
||||
- name: Defaulting iiab_base_ver
|
||||
set_fact:
|
||||
xsce_base_ver: 0
|
||||
when: xsce_base_ver == ""
|
||||
iiab_base_ver: 0
|
||||
when: iiab_base_ver == ""
|
||||
|
||||
- name: Defaulting xsce_prepped
|
||||
- name: Defaulting iiab_prepped
|
||||
set_fact:
|
||||
xsce_prepped: False
|
||||
iiab_prepped: False
|
||||
tags:
|
||||
- download
|
||||
- download2
|
||||
|
@ -29,23 +29,23 @@
|
|||
when: xo_model != "none"
|
||||
|
||||
- name: add version section
|
||||
ini_file: dest='{{ xsce_config_file }}'
|
||||
ini_file: dest='{{ iiab_config_file }}'
|
||||
section=runtime
|
||||
option='{{ item.option }}'
|
||||
value='{{ item.value }}'
|
||||
with_items:
|
||||
- option: 'runtime_branch'
|
||||
value: '{{ ansible_local["local_facts"]["xsce_branch"] }}'
|
||||
value: '{{ ansible_local["local_facts"]["iiab_branch"] }}'
|
||||
- option: 'runtime_commit'
|
||||
value: '{{ ansible_local["local_facts"]["xsce_commit"] }}'
|
||||
value: '{{ ansible_local["local_facts"]["iiab_commit"] }}'
|
||||
- option: 'runtime_date'
|
||||
value: '{{ ansible_date_time["iso8601"] }}'
|
||||
- option: 'runtime_php'
|
||||
value: '{{ phplib_dir }}'
|
||||
- option: 'runtime_preload'
|
||||
value: '{{ xsce_preload }}'
|
||||
value: '{{ iiab_preload }}'
|
||||
- option: 'runtime_base_ver'
|
||||
value: '{{ xsce_base_ver }}'
|
||||
value: '{{ iiab_base_ver }}'
|
||||
- option: 'kernel'
|
||||
value: '{{ ansible_kernel }}'
|
||||
- option: 'memory_mb'
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# above always registers
|
||||
- name: Checking for prior domain name
|
||||
set_fact:
|
||||
xsce_domain: "{{ prior_domain.stdout }}"
|
||||
iiab_domain: "{{ prior_domain.stdout }}"
|
||||
when: prior_domain.stdout != "lan" and prior_domain.stdout != ""
|
||||
|
||||
- name: xs_wan_device
|
||||
|
@ -53,7 +53,7 @@
|
|||
when: discovered_wan_iface != "none" and gw_active_test.stdout == "0"
|
||||
|
||||
- name: Test for internet access
|
||||
get_url: url="{{ xsce_download_url }}/heart-beat.txt" dest=/tmp/heart-beat.txt
|
||||
get_url: url="{{ iiab_download_url }}/heart-beat.txt" dest=/tmp/heart-beat.txt
|
||||
ignore_errors: True
|
||||
# async: 10
|
||||
# poll: 2
|
||||
|
@ -73,15 +73,15 @@
|
|||
no_network: True
|
||||
when: not has_internet_connection
|
||||
|
||||
- name: Testing for xsce_preload
|
||||
- name: Testing for iiab_preload
|
||||
set_fact:
|
||||
use_cache: True
|
||||
no_network: True
|
||||
when: xsce_preload == "True"
|
||||
when: iiab_preload == "True"
|
||||
|
||||
- name: Setting wan if detected
|
||||
set_fact:
|
||||
xsce_wan_iface: "{{ discovered_wan_iface }}"
|
||||
iiab_wan_iface: "{{ discovered_wan_iface }}"
|
||||
device_gw: "{{ discovered_wan_iface }}"
|
||||
when: discovered_wan_iface != "none"
|
||||
|
||||
|
@ -184,13 +184,13 @@
|
|||
- name: XO override 2 wifi on LAN
|
||||
set_fact:
|
||||
ap_device: "eth0"
|
||||
when: xsce_wan_iface != "eth0" and discovered_wireless_iface != "none" and xo_model == "XO-1.5"
|
||||
when: iiab_wan_iface != "eth0" and discovered_wireless_iface != "none" and xo_model == "XO-1.5"
|
||||
|
||||
# takes adapter name
|
||||
- name: Blacklisted wifi adapter
|
||||
set_fact:
|
||||
ap_device: "{{ blacklist_wifi }}"
|
||||
when: blacklist_wifi is defined and discovered_wireless_iface != xsce_wan_iface and num_wifi_interfaces >= "2"
|
||||
when: blacklist_wifi is defined and discovered_wireless_iface != iiab_wan_iface and num_wifi_interfaces >= "2"
|
||||
|
||||
# LAN - pick non WAN's
|
||||
- name: Create list of LAN (non wan) ifaces
|
||||
|
@ -201,7 +201,7 @@
|
|||
|
||||
# Select an adapter that is not WAN and not wireless
|
||||
# if there is more than one the last one wins
|
||||
- name: Set xsce discovered lan fact
|
||||
- name: Set iiab discovered lan fact
|
||||
set_fact:
|
||||
discovered_lan_iface: "{{ item|trim }}"
|
||||
when: item|trim != discovered_wireless_iface and item|trim != discovered_wan_iface
|
||||
|
@ -222,15 +222,15 @@
|
|||
# If 2 interfaces found in gateway mode, with one wifi, declare other to be wan
|
||||
#- name: In gateway mode with one wifi adapter, the other is WAN
|
||||
# set_fact:
|
||||
# xsce_wan_iface: "{{ discovered_lan_iface }}"
|
||||
# xsce_lan_iface: "{{ discovered_wireless_iface }}"
|
||||
# iiab_wan_iface: "{{ discovered_lan_iface }}"
|
||||
# iiab_lan_iface: "{{ discovered_wireless_iface }}"
|
||||
# num_lan_interfaces: "1"
|
||||
# when: xsce_lan_enabled and xsce_wan_enabled and num_lan_interfaces == "2" and discovered_wireless_iface != "none" and xsce_wan_iface == "none"
|
||||
# when: iiab_lan_enabled and iiab_wan_enabled and num_lan_interfaces == "2" and discovered_wireless_iface != "none" and iiab_wan_iface == "none"
|
||||
|
||||
- name: Set the variable for wireless_iface if present
|
||||
set_fact:
|
||||
xsce_wireless_lan_iface: "{{ discovered_wireless_iface }}"
|
||||
when: discovered_wireless_iface != "none" and discovered_wireless_iface != xsce_wan_iface
|
||||
iiab_wireless_lan_iface: "{{ discovered_wireless_iface }}"
|
||||
when: discovered_wireless_iface != "none" and discovered_wireless_iface != iiab_wan_iface
|
||||
|
||||
#unused
|
||||
- name: Get a list of ifcfg files to delete
|
||||
|
@ -238,29 +238,29 @@
|
|||
register: ifcfg_files
|
||||
changed_when: False
|
||||
ignore_errors: True
|
||||
when: num_lan_interfaces >= "1" or xsce_wireless_lan_iface != "none"
|
||||
when: num_lan_interfaces >= "1" or iiab_wireless_lan_iface != "none"
|
||||
#
|
||||
|
||||
# use value only if present
|
||||
- name: Setting detected lan
|
||||
set_fact:
|
||||
xsce_lan_iface: "{{ discovered_lan_iface }}"
|
||||
iiab_lan_iface: "{{ discovered_lan_iface }}"
|
||||
when: 'discovered_lan_iface != "none" and num_lan_interfaces == "1"'
|
||||
|
||||
- name: for debian, always use bridging
|
||||
set_fact:
|
||||
xsce_lan_iface: br0
|
||||
iiab_lan_iface: br0
|
||||
when: 'discovered_lan_iface != "none" and num_lan_interfaces >= "1" and is_debian'
|
||||
|
||||
- name: 2 or more devices on the LAN - use bridging
|
||||
set_fact:
|
||||
xsce_lan_iface: br0
|
||||
iiab_lan_iface: br0
|
||||
when: 'discovered_lan_iface != "none" and num_lan_interfaces >= "2" and not is_debian'
|
||||
|
||||
- name: WiFi is on the LAN - use bridging
|
||||
set_fact:
|
||||
xsce_lan_iface: br0
|
||||
when: xsce_wireless_lan_iface != "none"
|
||||
iiab_lan_iface: br0
|
||||
when: iiab_wireless_lan_iface != "none"
|
||||
|
||||
# OK try old gw this is a best guess based on what's in
|
||||
# /etc/sysconfig/xs_wan_device's last state intended to
|
||||
|
@ -272,7 +272,7 @@
|
|||
when: user_wan_iface == "auto" and device_gw != "none" and discovered_wan_iface == "none"
|
||||
|
||||
- name: Add location section to config file
|
||||
ini_file: dest='{{ xsce_config_file }}'
|
||||
ini_file: dest='{{ iiab_config_file }}'
|
||||
section=network
|
||||
option='{{ item.option }}'
|
||||
value='{{ item.value }}'
|
||||
|
@ -295,8 +295,8 @@
|
|||
value: '{{ num_wifi_interfaces }}'
|
||||
- option: 'discovered_wireless_iface'
|
||||
value: '{{ discovered_wireless_iface }}'
|
||||
- option: 'xsce_wireless_lan_iface'
|
||||
value: '{{ xsce_wireless_lan_iface }}'
|
||||
- option: 'iiab_wireless_lan_iface'
|
||||
value: '{{ iiab_wireless_lan_iface }}'
|
||||
- option: 'num_lan_interfaces'
|
||||
value: '{{ num_lan_interfaces }}'
|
||||
- option: 'detected_lan'
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
# workaround for fact that auto create does not work on ini_file
|
||||
- name: Create xsce config file
|
||||
file: dest='{{ xsce_config_file }}'
|
||||
- name: Create iiab config file
|
||||
file: dest='{{ iiab_config_file }}'
|
||||
state=touch
|
||||
|
||||
- name: Add location section to config file
|
||||
ini_file: dest='{{ xsce_config_file }}'
|
||||
ini_file: dest='{{ iiab_config_file }}'
|
||||
section=location
|
||||
option='{{ item.option }}'
|
||||
value='{{ item.value }}'
|
||||
with_items:
|
||||
- option: 'xsce_base'
|
||||
value: '{{ xsce_base }}'
|
||||
- option: 'xsce_dir'
|
||||
value: '{{ xsce_dir }}'
|
||||
- option: 'iiab_base'
|
||||
value: '{{ iiab_base }}'
|
||||
- option: 'iiab_dir'
|
||||
value: '{{ iiab_dir }}'
|
||||
|
||||
- name: add version section
|
||||
ini_file: dest='{{ xsce_config_file }}'
|
||||
ini_file: dest='{{ iiab_config_file }}'
|
||||
section=version
|
||||
option='{{ item.option }}'
|
||||
value='{{ item.value }}'
|
||||
|
@ -24,10 +24,10 @@
|
|||
value: '{{ ansible_distribution }}'
|
||||
- option: 'arch'
|
||||
value: '{{ ansible_architecture }}'
|
||||
- option: 'xsce_branch'
|
||||
value: '{{ ansible_local["local_facts"]["xsce_branch"] }}'
|
||||
- option: 'xsce_commit'
|
||||
value: '{{ ansible_local["local_facts"]["xsce_commit"] }}'
|
||||
- option: 'iiab_branch'
|
||||
value: '{{ ansible_local["local_facts"]["iiab_branch"] }}'
|
||||
- option: 'iiab_commit'
|
||||
value: '{{ ansible_local["local_facts"]["iiab_commit"] }}'
|
||||
- option: 'install_date'
|
||||
value: '{{ ansible_date_time["iso8601"] }}'
|
||||
- option: 'install_xo'
|
|
@ -43,7 +43,7 @@
|
|||
- include: prep.yml
|
||||
|
||||
# we need to inialize the ini file
|
||||
- include: xsce_ini.yml
|
||||
- include: iiab_ini.yml
|
||||
|
||||
- include: computed_vars.yml
|
||||
|
||||
|
@ -97,6 +97,6 @@
|
|||
|
||||
- name: download the firmware for built in wifi on NUC6
|
||||
get_url: dest=/lib/firmware
|
||||
url={{ xsce_download_url }}/iwlwifi-8000C-13.ucode
|
||||
url={{ iiab_download_url }}/iwlwifi-8000C-13.ucode
|
||||
when: usb_NUC6.stdout|int > 0
|
||||
|
||||
|
|
|
@ -2,18 +2,18 @@
|
|||
command: dnf install -y yum
|
||||
when: ansible_distribution == "Fedora" and ansible_distribution_version|int >= 22
|
||||
|
||||
- name: Install xsce-extra repos
|
||||
- name: Install iiab-extra repos
|
||||
template: backup=yes
|
||||
dest=/etc/yum.repos.d/xsce-extra.repo
|
||||
src=xsce-extra.repo
|
||||
dest=/etc/yum.repos.d/iiab-extra.repo
|
||||
src=iiab-extra.repo
|
||||
owner=root
|
||||
mode=0666
|
||||
when: is_redhat
|
||||
|
||||
- name: Install xsce-testing repos
|
||||
- name: Install iiab-testing repos
|
||||
template: backup=yes
|
||||
dest=/etc/yum.repos.d/xsce-testing.repo
|
||||
src=xsce-testing.repo
|
||||
dest=/etc/yum.repos.d/iiab-testing.repo
|
||||
src=iiab-testing.repo
|
||||
owner=root
|
||||
mode=0666
|
||||
when: is_redhat
|
||||
|
@ -25,24 +25,24 @@
|
|||
mode=0666
|
||||
when: ansible_distribution == "Fedora"
|
||||
|
||||
- name: Create /etc/xsce
|
||||
file: path=/etc/xsce
|
||||
- name: Create /etc/iiab
|
||||
file: path=/etc/iiab
|
||||
owner=root
|
||||
group=root
|
||||
mode=0755
|
||||
state=directory
|
||||
|
||||
# this script can be sourced to get xsce location
|
||||
- name: Create xsce.env file
|
||||
template: src=xsce.env.j2
|
||||
dest=/etc/xsce/xsce.env
|
||||
# this script can be sourced to get iiab location
|
||||
- name: Create iiab.env file
|
||||
template: src=iiab.env.j2
|
||||
dest=/etc/iiab/iiab.env
|
||||
owner=root
|
||||
group=root
|
||||
mode=0644
|
||||
|
||||
- name: put a python interface to xsce.env
|
||||
template: src=xsce_env.py.j2
|
||||
dest=/etc/xsce/xsce_env.py
|
||||
- name: put a python interface to iiab.env
|
||||
template: src=iiab_env.py.j2
|
||||
dest=/etc/iiab/iiab_env.py
|
||||
|
||||
- name: create ansible.d facts directory
|
||||
file: path=/etc/ansible/facts.d
|
||||
|
@ -65,7 +65,7 @@
|
|||
set_fact:
|
||||
phplib_dir: '{{ ansible_local["local_facts"]["phplib_dir"] }}'
|
||||
xo_model: '{{ ansible_local["local_facts"]["xo_model"] }}'
|
||||
xsce_preload: '{{ ansible_local["local_facts"]["xsce_preload"] }}'
|
||||
iiab_preload: '{{ ansible_local["local_facts"]["iiab_preload"] }}'
|
||||
|
||||
- name: Install script to fully initialize network config, and/or collect data
|
||||
# calling xs-network-reset w/ snapshot name, stores info, but aborts reset
|
||||
|
|
|
@ -49,11 +49,11 @@
|
|||
group=root
|
||||
mode={{ item.mode }}
|
||||
with_items:
|
||||
- { src: 'xsce-rpi-max-rootfs.sh', dest: '/usr/sbin/xsce-rpi-max-rootfs.sh', mode: '0755'}
|
||||
- { src: 'xsce-rpi-root-resize.service', dest: '/etc/systemd/system/xsce-rpi-root-resize.service', mode: '0644'}
|
||||
- { src: 'iiab-rpi-max-rootfs.sh', dest: '/usr/sbin/iiab-rpi-max-rootfs.sh', mode: '0755'}
|
||||
- { src: 'iiab-rpi-root-resize.service', dest: '/etc/systemd/system/iiab-rpi-root-resize.service', mode: '0644'}
|
||||
|
||||
- name: Enable rootfs resizing service
|
||||
service: name=xsce-rpi-root-resize
|
||||
service: name=iiab-rpi-root-resize
|
||||
enabled=yes
|
||||
- name: Reboot if the config.txt was changed
|
||||
command: /sbin/reboot
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[xsce-extra]
|
||||
name=xsce-extra
|
||||
[iiab-extra]
|
||||
name=iiab-extra
|
||||
failovermethod=priority
|
||||
baseurl=http://download.unleashkids.org/xsce/repos/xs-extra/
|
||||
baseurl=http://download.iiab.io/repos/xs-extra/
|
||||
enabled=1
|
||||
metadata_expire=1d
|
||||
gpgcheck=0
|
||||
|
@ -9,7 +9,7 @@ gpgcheck=0
|
|||
[dummy-config]
|
||||
name=dummy-config
|
||||
failovermethod=priority
|
||||
baseurl=http://download.unleashkids.org/xsce/repos/xsce-extra/
|
||||
baseurl=http://download.iiab.io/repos/xsce-extra/
|
||||
enabled=1
|
||||
metadata_expire=1d
|
||||
gpgcheck=0
|
|
@ -4,7 +4,7 @@ Description=Root Filesystem Auto-Resizer
|
|||
[Service]
|
||||
Environment=TERM=linux
|
||||
Type=oneshot
|
||||
ExecStart=/usr/sbin/xsce-rpi-max-rootfs.sh
|
||||
ExecStart=/usr/sbin/iiab-rpi-max-rootfs.sh
|
||||
StandardError=syslog
|
||||
RemainAfterExit=no
|
||||
|
7
roles/1-prep/templates/iiab-testing.repo
Normal file
7
roles/1-prep/templates/iiab-testing.repo
Normal file
|
@ -0,0 +1,7 @@
|
|||
[iiab-testing]
|
||||
name=iiab-testing
|
||||
failovermethod=priority
|
||||
baseurl=http://download.iiab.io/repos/xsce/testing
|
||||
enabled=1
|
||||
metadata_expire=1d
|
||||
gpgcheck=0
|
|
@ -1,6 +1,6 @@
|
|||
# This is a configuration file for XSCE
|
||||
# It can sourced in a shell script or read into an application
|
||||
XSCE_BASE_PATH={{ xsce_base }}
|
||||
XSCE_DIR={{ xsce_dir }}
|
||||
XSCE_BASE_PATH={{ iiab_base }}
|
||||
XSCE_DIR={{ iiab_dir }}
|
||||
OS={{ ansible_distribution }}
|
||||
WWWROOT={{ doc_root }}
|
|
@ -1,10 +1,10 @@
|
|||
#!/usr/bin/python
|
||||
# read xsce.env from python
|
||||
# read iiab.env from python
|
||||
|
||||
def get_xsce_env(name):
|
||||
""" read xsce.env file for a value, return "" if does not exist"""
|
||||
def get_iiab_env(name):
|
||||
""" read iiab.env file for a value, return "" if does not exist"""
|
||||
try:
|
||||
fd = open("/etc/xsce/xsce.env","r")
|
||||
fd = open("/etc/iiab/iiab.env","r")
|
||||
for line in fd:
|
||||
line = line.lstrip()
|
||||
line = line.rstrip('\n')
|
||||
|
@ -24,4 +24,4 @@ def get_xsce_env(name):
|
|||
fd.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(get_xsce_env("WWWROOT"))
|
||||
print(get_iiab_env("WWWROOT"))
|
|
@ -3,12 +3,12 @@ OS=`grep ^ID= /etc/*release|cut -d= -f2`
|
|||
OS=${OS//\"/}
|
||||
|
||||
# enable this install config to be tracked
|
||||
if [ ! -f /etc/xsce/uuid ]; then
|
||||
uuidgen > /etc/xsce/uuid
|
||||
if [ ! -f /etc/iiab/uuid ]; then
|
||||
uuidgen > /etc/iiab/uuid
|
||||
fi
|
||||
UUID=`cat /etc/xsce/uuid`
|
||||
UUID=`cat /etc/iiab/uuid`
|
||||
|
||||
source /etc/xsce/xsce.env
|
||||
source /etc/iiab/iiab.env
|
||||
cd $XSCE_DIR
|
||||
|
||||
# get current version
|
||||
|
@ -33,9 +33,9 @@ else
|
|||
XO_VERSION="none"
|
||||
fi
|
||||
|
||||
if [ -f /etc/xsce/xsce.env ]
|
||||
if [ -f /etc/iiab/iiab.env ]
|
||||
then
|
||||
. /etc/xsce/xsce.env
|
||||
. /etc/iiab/iiab.env
|
||||
if [ -z $BASE_VERSION ]
|
||||
then
|
||||
BASE_VERSION="0"
|
||||
|
@ -54,12 +54,12 @@ fi
|
|||
ANSIBLE_VERSION=$(ansible --version|head -n 1|cut -f 2 -d " ")
|
||||
cat <<EOF
|
||||
{"phplib_dir" : "$PHPLIB_DIR",
|
||||
"xsce_branch" : "$BRANCH",
|
||||
"xsce_commit" : "$COMMIT",
|
||||
"xsce_uuid" : "$UUID",
|
||||
"iiab_branch" : "$BRANCH",
|
||||
"iiab_commit" : "$COMMIT",
|
||||
"iiab_uuid" : "$UUID",
|
||||
"xo_model" : "$XO_VERSION",
|
||||
"xsce_base_ver" : "$BASE",
|
||||
"iiab_base_ver" : "$BASE",
|
||||
"ansble_version" : "$ANSIBLE_VERSION",
|
||||
"os" : "$OS",
|
||||
"xsce_preload" : "$PRELOAD"}
|
||||
"iiab_preload" : "$PRELOAD"}
|
||||
EOF
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
[xsce-rpmfusion-free-updates]
|
||||
name=xsce-RPM Fusion for Fedora $releasever - Free - Updates
|
||||
[iiab-rpmfusion-free-updates]
|
||||
name=iiab-RPM Fusion for Fedora $releasever - Free - Updates
|
||||
#baseurl=http://download1.rpmfusion.org/free/fedora/updates/$releasever/$basearch/
|
||||
mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-updates-released-$releasever&arch=$basearch
|
||||
enabled=0
|
||||
gpgcheck=0
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever
|
||||
|
||||
[xsce-rpmfusion-free-updates-debuginfo]
|
||||
name=xsce-RPM Fusion for Fedora $releasever - Free - Updates Debug
|
||||
[iiab-rpmfusion-free-updates-debuginfo]
|
||||
name=iiab-RPM Fusion for Fedora $releasever - Free - Updates Debug
|
||||
#baseurl=http://download1.rpmfusion.org/free/fedora/updates/$releasever/$basearch/debug/
|
||||
mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-updates-released-debug-$releasever&arch=$basearch
|
||||
enabled=0
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever
|
||||
|
||||
[xsce-rpmfusion-free-updates-source]
|
||||
name=xsce-RPM Fusion for Fedora $releasever - Free - Updates Source
|
||||
[iiab-rpmfusion-free-updates-source]
|
||||
name=iiab-RPM Fusion for Fedora $releasever - Free - Updates Source
|
||||
#baseurl=http://download1.rpmfusion.org/free/fedora/updates/$releasever/SRPMS/
|
||||
mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-updates-released-source-$releasever&arch=$basearch
|
||||
enabled=0
|
||||
|
|
|
@ -38,8 +38,8 @@ echo "/etc/resolv.conf"
|
|||
cat /etc/resolv.conf
|
||||
echo
|
||||
echo "=========================================================="
|
||||
echo "cat /etc/xsce/xsce.ini"
|
||||
cat /etc/xsce/xsce.ini
|
||||
echo "cat /etc/iiab/iiab.ini"
|
||||
cat /etc/iiab/iiab.ini
|
||||
echo
|
||||
echo "=========================================================="
|
||||
echo "routing table"
|
||||
|
@ -47,14 +47,14 @@ netstat -rn
|
|||
echo
|
||||
echo "=========================================================="
|
||||
echo "install log -- last 50 lines"
|
||||
tail -50 /opt/schoolserver/xsce/xsce-install.log
|
||||
tail -50 /opt/schoolserver/iiab/iiab-install.log
|
||||
echo
|
||||
echo "=========================================================="
|
||||
echo "xsce-network log -- last 50 lines"
|
||||
if [ -f /opt/schoolserver/xsce/xsce-network.log ]; then
|
||||
tail -50 /opt/schoolserver/xsce/xsce-network.log
|
||||
echo "iiab-network log -- last 50 lines"
|
||||
if [ -f /opt/schoolserver/iiab/iiab-network.log ]; then
|
||||
tail -50 /opt/schoolserver/iiab/iiab-network.log
|
||||
else
|
||||
echo no xsce-network.log
|
||||
echo no iiab-network.log
|
||||
fi
|
||||
echo
|
||||
echo "=========================================================="
|
||||
|
@ -74,10 +74,10 @@ EOF
|
|||
chmod 755 /tmp/script2overview
|
||||
/tmp/script2overview > /tmp/$basket/overview
|
||||
|
||||
if [ -f /opt/schoolserver/xsce/xsce-network.log ]; then
|
||||
cp /opt/schoolserver/xsce/xsce-network.log /tmp/$basket
|
||||
if [ -f /opt/schoolserver/iiab/iiab-network.log ]; then
|
||||
cp /opt/schoolserver/iiab/iiab-network.log /tmp/$basket
|
||||
else
|
||||
touch /tmp/$basket/no_xsce-network.log
|
||||
touch /tmp/$basket/no_iiab-network.log
|
||||
fi
|
||||
|
||||
if [ -f /etc/sysconfig/xs_domain_name ];then
|
||||
|
@ -101,20 +101,20 @@ if [ $? -eq 0 ]; then
|
|||
cp -rp /etc/NetworkManager/system-connections /tmp/$basket
|
||||
fi
|
||||
cp /etc/sysconfig/network-scripts/ifcfg-* /tmp/$basket
|
||||
if [ -f /opt/schoolserver/xsce/xsce-network.log ]; then
|
||||
cp -p /opt/schoolserver/xsce/xsce-network.log /tmp/$basket
|
||||
if [ -f /opt/schoolserver/iiab/iiab-network.log ]; then
|
||||
cp -p /opt/schoolserver/iiab/iiab-network.log /tmp/$basket
|
||||
fi
|
||||
|
||||
mkdir -p /etc/xsce/diagnose/
|
||||
mkdir -p /etc/iiab/diagnose/
|
||||
if [ ! -z $diagnose_name ];then
|
||||
pushd /tmp > /dev/null
|
||||
tar czf /etc/xsce/diagnose/$basket.tgz $basket/*
|
||||
tar czf /etc/iiab/diagnose/$basket.tgz $basket/*
|
||||
popd > /dev/null
|
||||
rm -rf /tmp/$basket
|
||||
exit 0
|
||||
else
|
||||
pushd /tmp > /dev/null
|
||||
tar czf /etc/xsce/diagnose/$basket.tgz $basket/*
|
||||
tar czf /etc/iiab/diagnose/$basket.tgz $basket/*
|
||||
popd > /dev/null
|
||||
rm -rf /tmp/$basket
|
||||
fi
|
||||
|
@ -134,4 +134,4 @@ if [ $? -eq 0 ]; then
|
|||
ls -1 /etc/sysconfig/network-scripts/ifcfg-*|grep -v -e ifcfg-lo|xargs rm
|
||||
fi
|
||||
|
||||
echo -e "\n\nAll Network variables erased. Now run 'xsce-network' to set up the new network configuration.\n\nPlease see /opt/schoolserver/xsce/docs/GETTING_HELP.rst for ways to get help or \nprovide the feedback which will improve XSCE\n\n"
|
||||
echo -e "\n\nAll Network variables erased. Now run 'iiab-network' to set up the new network configuration.\n\nPlease see /opt/schoolserver/iiab/docs/GETTING_HELP.rst for ways to get help or \nprovide the feedback which will improve XSCE\n\n"
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
[xsce-testing]
|
||||
name=xsce-testing
|
||||
failovermethod=priority
|
||||
baseurl=http://download.unleashkids.org/xsce/repos/xsce/testing
|
||||
enabled=1
|
||||
metadata_expire=1d
|
||||
gpgcheck=0
|
|
@ -16,7 +16,7 @@
|
|||
- name: Install XECE repo for CentOS
|
||||
template: src={{ item }} dest=/etc/yum.repos.d/ owner=root group=root mode=0644
|
||||
with_items:
|
||||
- xsce-centos.repo
|
||||
- iiab-centos.repo
|
||||
- li.nux.ro.repo
|
||||
|
||||
- name: Disable updating ejabberd on CentOS
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- name: Create /opt/schoolserver/xsce
|
||||
file: path={{ xsce_dir }}
|
||||
- name: Create /opt/schoolserver/iiab
|
||||
file: path={{ iiab_dir }}
|
||||
owner=root
|
||||
group=root
|
||||
mode=0755
|
||||
|
@ -37,8 +37,8 @@
|
|||
- /library/downloads/rachel
|
||||
- /library/working/zims
|
||||
- /library/working/rachel
|
||||
- "{{ xsce_zim_path }}/content"
|
||||
- "{{ xsce_zim_path }}/index"
|
||||
- "{{ iiab_zim_path }}/content"
|
||||
- "{{ iiab_zim_path }}/index"
|
||||
- "{{ rachel_doc_root }}"
|
||||
|
||||
- name: Create directory for common packages
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
# workaround for fact that auto create does not work on ini_file
|
||||
- name: Create xsce config file
|
||||
file: dest='{{ xsce_config_file }}'
|
||||
- name: Create iiab config file
|
||||
file: dest='{{ iiab_config_file }}'
|
||||
state=touch
|
||||
|
||||
- name: Add location section to config file
|
||||
ini_file: dest='{{ xsce_config_file }}'
|
||||
ini_file: dest='{{ iiab_config_file }}'
|
||||
section=location
|
||||
option='{{ item.option }}'
|
||||
value='{{ item.value }}'
|
||||
with_items:
|
||||
- option: 'xsce_base'
|
||||
value: '{{ xsce_base }}'
|
||||
- option: 'xsce_dir'
|
||||
value: '{{ xsce_dir }}'
|
||||
- option: 'iiab_base'
|
||||
value: '{{ iiab_base }}'
|
||||
- option: 'iiab_dir'
|
||||
value: '{{ iiab_dir }}'
|
||||
|
||||
- name: add version section
|
||||
ini_file: dest='{{ xsce_config_file }}'
|
||||
ini_file: dest='{{ iiab_config_file }}'
|
||||
section=version
|
||||
option='{{ item.option }}'
|
||||
value='{{ item.value }}'
|
||||
|
@ -24,10 +24,10 @@
|
|||
value: '{{ ansible_distribution }}'
|
||||
- option: 'arch'
|
||||
value: '{{ ansible_architecture }}'
|
||||
- option: 'xsce_branch'
|
||||
value: '{{ ansible_local["local_facts"]["xsce_branch"] }}'
|
||||
- option: 'xsce_commit'
|
||||
value: '{{ ansible_local["local_facts"]["xsce_commit"] }}'
|
||||
- option: 'iiab_branch'
|
||||
value: '{{ ansible_local["local_facts"]["iiab_branch"] }}'
|
||||
- option: 'iiab_commit'
|
||||
value: '{{ ansible_local["local_facts"]["iiab_commit"] }}'
|
||||
- option: 'install_date'
|
||||
value: '{{ ansible_date_time["iso8601"] }}'
|
||||
- option: 'install_xo'
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
- include: xsce_ini.yml
|
||||
- include: iiab_ini.yml
|
||||
|
||||
# create the directory structure for XSCE
|
||||
- include: fl.yml
|
||||
|
@ -29,12 +29,12 @@
|
|||
- sysctl: name=net.ipv6.conf.lo.disable_ipv6 value=1 state=present
|
||||
|
||||
- name: Set default Timezone
|
||||
shell: ln -sf /usr/share/zoneinfo/{{ xsce_TZ }} /etc/localtime
|
||||
when: xsce_TZ is defined and xsce_TZ != ""
|
||||
shell: ln -sf /usr/share/zoneinfo/{{ iiab_TZ }} /etc/localtime
|
||||
when: iiab_TZ is defined and iiab_TZ != ""
|
||||
|
||||
- name: Install custom profile file
|
||||
template: dest=/etc/profile.d/zzz_xsce.sh
|
||||
src=zzz_xsce.sh
|
||||
template: dest=/etc/profile.d/zzz_iiab.sh
|
||||
src=zzz_iiab.sh
|
||||
owner=root
|
||||
mode=0644
|
||||
backup=no
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
when: is_redhat
|
||||
|
||||
- name: Install local repo file.
|
||||
template: dest=/etc/yum.repos.d/xsce-local.repo
|
||||
template: dest=/etc/yum.repos.d/iiab-local.repo
|
||||
src=local.repo
|
||||
owner=root
|
||||
mode=0644
|
||||
|
@ -77,9 +77,16 @@
|
|||
- openssl #FC 18 does not supply, but pear requires
|
||||
- gawk
|
||||
- curl
|
||||
- pandoc
|
||||
tags:
|
||||
- download
|
||||
|
||||
- name: Install pip as a commonly required package management system
|
||||
command: curl https://bootstrap.pypa.io/get-pip.py -o {{ downloads_dir }}/get-pip.py
|
||||
|
||||
- name: Run the install script for pip
|
||||
command: python {{ downloads_dir }}/get-pip.py
|
||||
|
||||
- name: Update common packages (not debian
|
||||
package: name={{ item }}
|
||||
state=latest
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
state=absent
|
||||
|
||||
- name: Download substitute software for i386 on FC18 XO1.5
|
||||
get_url: url="{{ xsce_download_url }}/{{ item }}" dest={{ downloads_dir}}/{{ item }}
|
||||
get_url: url="{{ iiab_download_url }}/{{ item }}" dest={{ downloads_dir}}/{{ item }}
|
||||
with_items:
|
||||
- hostapd_8188_i386
|
||||
when: wifi_id == "tplink_WM725M" and xo_model == "XO-1.5" and not {{ use_cache }} and not {{ no_network }}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
when: is_redhat
|
||||
|
||||
- name: Install local repo file.
|
||||
template: dest=/etc/yum.repos.d/xsce-local.repo
|
||||
template: dest=/etc/yum.repos.d/iiab-local.repo
|
||||
src=local.repo
|
||||
owner=root
|
||||
mode=0644
|
||||
|
|
7
roles/2-common/templates/iiab-centos.repo
Normal file
7
roles/2-common/templates/iiab-centos.repo
Normal file
|
@ -0,0 +1,7 @@
|
|||
[iiab-centos]
|
||||
name=iiab-centos
|
||||
failovermethod=priority
|
||||
baseurl=http://download.iiab.io/repos/centos
|
||||
enabled=1
|
||||
metadata_expire=1d
|
||||
gpgcheck=0
|
|
@ -1,5 +1,5 @@
|
|||
[xsce-local]
|
||||
name=xsce-local
|
||||
[iiab-local]
|
||||
name=iiab-local
|
||||
baseurl=file://{{ yum_packages_dir }}
|
||||
enabled=1
|
||||
gpgcheck=0
|
||||
|
|
74
roles/2-common/templates/refresh-wiki-docs.sh
Executable file
74
roles/2-common/templates/refresh-wiki-docs.sh
Executable file
|
@ -0,0 +1,74 @@
|
|||
#!/bin/bash -x
|
||||
# pull down repo wiki, and imbed in docs subdirectory
|
||||
|
||||
source /etc/iiab/iiab.env
|
||||
REPONAME=iiab
|
||||
REPO=https://github.com/iiab
|
||||
WIKI=iiab-wiki
|
||||
TARGET_URL=/info
|
||||
WWWROOT=/library/www/html
|
||||
INPUT=/tmp/${WIKI}
|
||||
OUTPUT=/tmp/${WIKI}.out
|
||||
|
||||
# this script is located in the scritps/ directory in the local repo
|
||||
SCRIPTDIR=$(dirname $0)
|
||||
pushd $SCRIPTDIR
|
||||
|
||||
rm -rf $INPUT
|
||||
rm -rf $OUTPUT
|
||||
mkdir -p $INPUT
|
||||
mkdir -p $OUTPUT
|
||||
|
||||
git clone $REPO/$REPONAME.wiki.git $INPUT
|
||||
|
||||
# convert the markdown docs to html
|
||||
which pandoc
|
||||
if [ $? -ne 0 ]; then
|
||||
if [ "$OS" = "CentOS" ] || [ "$OS" = "Fedora" ]; then
|
||||
yum install -y pandoc
|
||||
else
|
||||
apt-get install -y pandoc
|
||||
fi
|
||||
fi
|
||||
mkdir -p $WWWROOT$TARGET_URL/html
|
||||
|
||||
# To Do find more links to rewrite, especially after moving from iiab to iiab
|
||||
for f in `ls /tmp/${WIKI}`; do
|
||||
FTRIMMED=${f%.md}
|
||||
if [ $FTRIMMED = "Home" ]; then FTRIMMED=index;fi
|
||||
pandoc -s /tmp/${WIKI}/$f -o $OUTPUT/$FTRIMMED.html
|
||||
# make links refer to local directory
|
||||
sed -i -e "s|$REPO/$REPONAME/wiki/\(.*\)\">|./\1.html\">|" $OUTPUT/$FTRIMMED.html
|
||||
sed -i -e "s|http://schoolserver.org/faq|/info/html/FAQ|" $OUTPUT/$FTRIMMED.html
|
||||
sed -i -e "s|$REPO/$REPONAME/blob/release-.*/\(.*\)\">|./\1.html\">|" $OUTPUT/$FTRIMMED.html
|
||||
done
|
||||
|
||||
rsync -av $OUTPUT/ $WWWROOT$TARGET_URL
|
||||
|
||||
# copy the faq and other things
|
||||
lynx -reload -source http://wiki.laptop.org/go/XS_Community_Edition/FAQ > $WWWROOT$TARGET_URL/html/FAQ
|
||||
lynx -reload -source http://wiki.laptop.org/go/XS_Community_Edition/Security > $WWWROOT$TARGET_URL/html/Security
|
||||
lynx -reload -source http://wiki.laptop.org/go/XS_Community_Edition/local_vars.yml > $WWWROOT$TARGET_URL/html/local_vars.yml
|
||||
|
||||
# fetch the embedded help pages from the admin console
|
||||
#for f in `ls ../roles/iiab-admin/files/console/help`; do
|
||||
# FTRIMMED=${f%.rst}
|
||||
# pandoc -s ../roles/iiab-admin/files/console/help/$f -o ../docs/html/offline-help/$FTRIMMED.html
|
||||
# # make links refer to local directory
|
||||
# sed -i -e "s|$REPO/$REPONAME/wiki/\(.*\)\">|./\1.html\">)|" ../docs/html/$FTRIMMED.html
|
||||
#done
|
||||
|
||||
# fetch the recent release notes
|
||||
for f in `ls ../Release*`; do
|
||||
# FTRIMMED=${f%.md}
|
||||
FTRIMMED=${f:2}
|
||||
pandoc -s $f -o $WWWROOT$TARGET_URL$FTRIMMED.html
|
||||
# make links refer to local directory
|
||||
sed -i -e "s|$REPO/$REPONAME/wiki/\(.*\)\">|./\1.html\">)|" $WWWROOT$TARGET_URL$FTRIMMED.html
|
||||
done
|
||||
|
||||
rm -rf $INPUT
|
||||
rm -rf $OUTPUT
|
||||
|
||||
popd
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
[xsce-centos]
|
||||
name=xsce-centos
|
||||
failovermethod=priority
|
||||
baseurl=http://download.unleashkids.org/xsce/repos/centos
|
||||
enabled=1
|
||||
metadata_expire=1d
|
||||
gpgcheck=0
|
|
@ -1,4 +1,4 @@
|
|||
dependencies:
|
||||
- { role: httpd, tags: ['services','httpd','base'] }
|
||||
- { role: xsce-admin, tags: ['services','xsce-admin','base'] }
|
||||
- { role: iiab-admin, tags: ['services','iiab-admin','base'] }
|
||||
- { role: network, tags: ['services','base','network'], when: not gui_desired_network_role is defined }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
file: dest={{ doc_root }}/local_content
|
||||
state=directory
|
||||
|
||||
- name: Set up to issue warning if xsce-admin password is still default
|
||||
- name: Set up to issue warning if iiab-admin password is still default
|
||||
template: src=profile_ssh_warn.sh
|
||||
dest=/etc/profile.d/
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
# If we got here we're done
|
||||
- name: Record base gui version
|
||||
lineinfile: dest=/etc/xsce/xsce.env
|
||||
lineinfile: dest=/etc/iiab/iiab.env
|
||||
regexp='^BASE_VERSION=*'
|
||||
line='BASE_VERSION="{{ gui_version }}"'
|
||||
state=present
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
# credit to the folks at raspberry pi foundatioon
|
||||
check_hash ()
|
||||
{
|
||||
if ! id -u xsce-admin > /dev/null 2>&1 ; then return 0 ; fi
|
||||
if ! id -u iiab-admin > /dev/null 2>&1 ; then return 0 ; fi
|
||||
if grep -q "^PasswordAuthentication\s*no" /etc/ssh/sshd_config ; then return 0 ; fi
|
||||
test -x /usr/bin/mkpasswd || return 0
|
||||
SHADOW="$(sudo -n grep -E '^xsce-admin:' /etc/shadow 2>/dev/null)"
|
||||
SHADOW="$(sudo -n grep -E '^iiab-admin:' /etc/shadow 2>/dev/null)"
|
||||
test -n "${SHADOW}" || return 0
|
||||
if echo $SHADOW | grep -q "xsce-admin:!" ; then return 0 ; fi
|
||||
if echo $SHADOW | grep -q "iiab-admin:!" ; then return 0 ; fi
|
||||
SHADOW_PW=$(echo $SHADOW | cut -d: -f2)
|
||||
if [ "$SHADOW_PW" != "\$6\$xsce51\$D.IrrEeLBYIuJkGDmi27pZUGOwPFp98qpl3hxMwWV4hXigFGmdSvy3s/j7tn6OnyTTLmlV7SsN0lCUAFzxSop." ]; then return 0 ; fi
|
||||
if [ "$SHADOW_PW" != "\$6\$iiab51\$D.IrrEeLBYIuJkGDmi27pZUGOwPFp98qpl3hxMwWV4hXigFGmdSvy3s/j7tn6OnyTTLmlV7SsN0lCUAFzxSop." ]; then return 0 ; fi
|
||||
|
||||
if echo "${SHADOW}" | grep -q "${HASH}"; then
|
||||
zenity --warning --text="SSH is enabled and the default password for the 'xsce-admin' user has not been changed.\nThis is a security risk - please go to the xsce-console and use utilities-> change password to set a new password."
|
||||
zenity --warning --text="SSH is enabled and the default password for the 'iiab-admin' user has not been changed.\nThis is a security risk - please go to the iiab-console and use utilities-> change password to set a new password."
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
# credit to the folks at raspberry pi foundatioon
|
||||
check_hash ()
|
||||
{
|
||||
if ! id -u xsce-admin > /dev/null 2>&1 ; then return 0 ; fi
|
||||
if ! id -u iiab-admin > /dev/null 2>&1 ; then return 0 ; fi
|
||||
if grep -q "^PasswordAuthentication\s*no" /etc/ssh/sshd_config ; then return 0 ; fi
|
||||
SHADOW="$(sudo -n grep -E '^xsce-admin:' /etc/shadow 2>/dev/null)"
|
||||
SHADOW="$(sudo -n grep -E '^iiab-admin:' /etc/shadow 2>/dev/null)"
|
||||
test -n "${SHADOW}" || return 0
|
||||
if echo $SHADOW | grep -q "xsce-admin:!" ; then return 0 ; fi
|
||||
if echo $SHADOW | grep -q "iiab-admin:!" ; then return 0 ; fi
|
||||
SHADOW_PW=$(echo $SHADOW | cut -d: -f2)
|
||||
if [ "$SHADOW_PW" != "\$6\$xsce51\$D.IrrEeLBYIuJkGDmi27pZUGOwPFp98qpl3hxMwWV4hXigFGmdSvy3s/j7tn6OnyTTLmlV7SsN0lCUAFzxSop." ]; then return 0 ; fi
|
||||
if [ "$SHADOW_PW" != "\$6\$iiab51\$D.IrrEeLBYIuJkGDmi27pZUGOwPFp98qpl3hxMwWV4hXigFGmdSvy3s/j7tn6OnyTTLmlV7SsN0lCUAFzxSop." ]; then return 0 ; fi
|
||||
|
||||
echo
|
||||
echo "SSH is enabled and the default password for the 'xsce-admin' user is unchanged."
|
||||
echo "This is a security risk - please login as the 'xsce-admin' user and type 'passwd' to change password."
|
||||
echo "SSH is enabled and the default password for the 'iiab-admin' user is unchanged."
|
||||
echo "This is a security risk - please login as the 'iiab-admin' user and type 'passwd' to change password."
|
||||
echo
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
# Wish synchronize worked, but it doesn't
|
||||
|
||||
- name: Copy language templates
|
||||
command: rsync -a {{xsce_dir}}/roles/activity-server/files/lang_templates /library/xs-activity-server/
|
||||
command: rsync -a {{iiab_dir}}/roles/activity-server/files/lang_templates /library/xs-activity-server/
|
||||
|
||||
- name: Copy default index files
|
||||
copy: src={{ item }}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
Alias /activities /library/xs-activity-server/www
|
||||
<Directory /library/xs-activity-server/www >
|
||||
# Languages are set in 010-xsce.conf
|
||||
# Languages are set in 010-iiab.conf
|
||||
|
||||
ExpiresActive On
|
||||
ExpiresDefault now
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- name: download wondershaper ajenti plugin
|
||||
pip: name="{{ xsce_download_url }}"/ajenti-plugin-wondershaper-0.3.tar.gz
|
||||
pip: name="{{ iiab_download_url }}"/ajenti-plugin-wondershaper-0.3.tar.gz
|
||||
extra_args="--download {{ pip_packages_dir }}"
|
||||
when: not {{ use_cache }} and not {{ no_network }}
|
||||
tags:
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
- download
|
||||
|
||||
- name: download ajenti from our repo
|
||||
pip: name="{{ xsce_download_url }}"/ajenti-0.99.34-patched5.tar.gz
|
||||
pip: name="{{ iiab_download_url }}"/ajenti-0.99.34-patched5.tar.gz
|
||||
extra_args="--download {{ pip_packages_dir }}"
|
||||
when: not {{ use_cache }} and not {{ no_network }}
|
||||
tags:
|
||||
|
@ -56,7 +56,7 @@
|
|||
state=file
|
||||
|
||||
- include: ajenti-wondershaper.yml
|
||||
when: 'xsce_lan_iface != ""'
|
||||
when: 'iiab_lan_iface != ""'
|
||||
|
||||
# handler doesn't fire
|
||||
- name: restart ajenti service
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
- name: Create directory for awstat to use as intermediate summary storage
|
||||
file: path={{ item }}
|
||||
mode=0750
|
||||
owner={{ apache_data }}
|
||||
group={{ apache_data }}
|
||||
owner={{ apache_user }}
|
||||
group={{ apache_user }}
|
||||
state=directory
|
||||
force=true
|
||||
with_items:
|
||||
|
|
|
@ -154,7 +154,7 @@ LogSeparator=" "
|
|||
# Example: "ftp.domain.com"
|
||||
# Example: "domain.com"
|
||||
#
|
||||
SiteDomain="{{ xsce_hostname }}.{{ xsce_domain }}"
|
||||
SiteDomain="{{ iiab_hostname }}.{{ iiab_domain }}"
|
||||
|
||||
|
||||
# Enter here all other possible domain names, addresses or virtual host
|
||||
|
@ -169,7 +169,7 @@ SiteDomain="{{ xsce_hostname }}.{{ xsce_domain }}"
|
|||
# Note: You can also use @/mypath/myfile if list of aliases are in a file.
|
||||
# Example: "www.myserver.com localhost 127.0.0.1 REGEX[mydomain\.(net|org)$]"
|
||||
#
|
||||
HostAliases="REGEX[^.*{{ xsce_hostname }}\.{{ xsce_domain }}$]"
|
||||
HostAliases="REGEX[^.*{{ iiab_hostname }}\.{{ iiab_domain }}$]"
|
||||
|
||||
|
||||
# If you want to have hosts reported by name instead of ip address, AWStats
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
state=directory
|
||||
|
||||
- name: get the ttf-ubuntu-font-family
|
||||
get_url: url={{ xsce_download_url }}/ubuntu-font-family-0.83.zip
|
||||
get_url: url={{ iiab_download_url }}/ubuntu-font-family-0.83.zip
|
||||
dest={{ downloads_dir }}
|
||||
tags: download2
|
||||
|
||||
|
@ -33,19 +33,19 @@
|
|||
dest=/usr/share/fonts/truetype/ttf-ubuntu/
|
||||
|
||||
- name: get the schooltool source
|
||||
get_url: url={{ xsce_download_url }}/{{ schooltool_src }}
|
||||
get_url: url={{ iiab_download_url }}/{{ schooltool_src }}
|
||||
dest={{ downloads_dir }}
|
||||
tags: download2
|
||||
|
||||
- name: expand source to dest
|
||||
unarchive: src={{ downloads_dir }}/{{ schooltool_src }}
|
||||
dest={{ xsce_base }}
|
||||
dest={{ iiab_base }}
|
||||
|
||||
- name: create a link for schooltool
|
||||
file: src={{ xsce_base }}/{{ schooltool_version }}
|
||||
dest={{ xsce_base }}/schooltool
|
||||
file: src={{ iiab_base }}/{{ schooltool_version }}
|
||||
dest={{ iiab_base }}/schooltool
|
||||
state=link
|
||||
|
||||
- name: build the schooltool from source
|
||||
shell: command='$( cd {{ xsce_base }}/schooltool; /usr/bin/make ) '
|
||||
shell: command='$( cd {{ iiab_base }}/schooltool; /usr/bin/make ) '
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- name: Get the Dokuwiki software
|
||||
get_url: url="{{ xsce_download_url }}/{{ dokuwiki_version }}" dest={{ downloads_dir}}/
|
||||
get_url: url="{{ iiab_download_url }}/{{ dokuwiki_version }}" dest={{ downloads_dir}}/
|
||||
when: not {{ use_cache }} and not {{ no_network }}
|
||||
tags:
|
||||
- download2
|
||||
|
@ -27,7 +27,7 @@
|
|||
|
||||
|
||||
- name: Change permissions on engine directory so apache can write
|
||||
file: path=/library/dokuwiki owner={{ apache_data }} mode=0755 state=directory recurse=yes
|
||||
file: path=/library/dokuwiki owner={{ apache_user }} mode=0755 state=directory recurse=yes
|
||||
|
||||
- name: Restart apache, so it picks up the new aliases
|
||||
service: name={{ apache_service }} state=restarted
|
||||
|
|
|
@ -42,7 +42,7 @@ do
|
|||
if [ -e $config ]; then
|
||||
mv $config $config.$BACKUP_SUFFIX
|
||||
fi
|
||||
sed -e s/{{ xsce_hostname }}/$new_name/ $config.in > $config ;
|
||||
sed -e s/{{ iiab_hostname }}/$new_name/ $config.in > $config ;
|
||||
else
|
||||
echo WARNING: Skipped $config - template file is missing!
|
||||
fi
|
||||
|
|
|
@ -86,7 +86,7 @@ override_acls.
|
|||
%% You can define one or several, for example:
|
||||
%% {hosts, ["example.net", "example.com", "example.org"]}.
|
||||
%%
|
||||
{hosts, ["{{ xsce_hostname }}.{{ xsce_domain }}"]}.
|
||||
{hosts, ["{{ iiab_hostname }}.{{ iiab_domain }}"]}.
|
||||
|
||||
%%
|
||||
%% route_subdomains: Delegate subdomains to other Jabber server.
|
||||
|
@ -312,7 +312,7 @@ override_acls.
|
|||
%%
|
||||
%%{acl, admin, {user, "aleksey", "localhost"}}.
|
||||
%%{acl, admin, {user, "ermine", "example.org"}}.
|
||||
{acl, admin, {user, "admin", "{{ xsce_hostname }}.{{ xsce_domain }}"}}.
|
||||
{acl, admin, {user, "admin", "{{ iiab_hostname }}.{{ iiab_domain }}"}}.
|
||||
|
||||
%%
|
||||
%% Blocked users
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- name: download current version from our copy
|
||||
shell: wget {{ xsce_download_url }}/elgg-{{ elgg_version }}.zip -c -P {{ downloads_dir }}
|
||||
shell: wget {{ iiab_download_url }}/elgg-{{ elgg_version }}.zip -c -P {{ downloads_dir }}
|
||||
when: not {{ use_cache }} and not {{ no_network }}
|
||||
tags:
|
||||
- download2
|
||||
|
@ -18,7 +18,7 @@
|
|||
|
||||
- name: change ownership
|
||||
file: path=/opt/elgg-{{elgg_version }}
|
||||
owner=apache
|
||||
owner={{ apache_user }}
|
||||
recurse=yes
|
||||
|
||||
- name: Create a link to the versioned elgg folder
|
||||
|
@ -64,7 +64,7 @@
|
|||
copy: src="/opt/{{ elgg_xx }}/install/config/htaccess.dist"
|
||||
dest="/opt/{{ elgg_xx }}/.htaccess"
|
||||
mode=0644
|
||||
owner=apache
|
||||
owner={{ apache_user }}
|
||||
group=root
|
||||
|
||||
- name: Modify .htaccess to have RewriteBase as our directory
|
||||
|
@ -100,10 +100,10 @@
|
|||
when: not elgg_enabled and is_debuntu
|
||||
|
||||
- name: Change permissions on engine directory so apache can write
|
||||
file: path=/opt/elgg/engine/ owner={{ apache_data }} mode=0755 state=directory
|
||||
file: path=/opt/elgg/engine/ owner={{ apache_user }} mode=0755 state=directory
|
||||
|
||||
- name: Create an upload directory that Apache can write in or elgg
|
||||
file: path={{ elgg_upload_path }} state=directory owner={{ apache_data }}
|
||||
file: path={{ elgg_upload_path }} state=directory owner={{ apache_user }}
|
||||
|
||||
- name: add elgg to service list
|
||||
ini_file: dest='{{ service_filelist }}'
|
||||
|
|
|
@ -34,11 +34,11 @@
|
|||
|
||||
Internet-in-a-Box also contains a number of applications each of which has its own attribution information which is included.<br><br>
|
||||
|
||||
This Internet-in-a-Box distribution resides at <a href="http://github.com/XSCE/xsce">github.com/XSCE/xsce</a>.<br><br>
|
||||
This Internet-in-a-Box distribution resides at <a href="http://github.com/XSCE/iiab">github.com/XSCE/iiab</a>.<br><br>
|
||||
|
||||
It is licensed under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.<br><br>
|
||||
|
||||
Licensing information may be found at <a href="http://github.com/XSCE/xsce/blob/master/LICENSE">github.com/XSCE/xsce/blob/master/LICENSE</a>.<br>
|
||||
Licensing information may be found at <a href="http://github.com/XSCE/iiab/blob/master/LICENSE">github.com/XSCE/iiab/blob/master/LICENSE</a>.<br>
|
||||
|
||||
</BODY>
|
||||
<script type="text/javascript" src="incl/xs-portal.js"></script>
|
||||
|
|
|
@ -34,11 +34,11 @@
|
|||
|
||||
Internet-in-a-Box also contains a number of applications each of which has its own attribution information which is included.<br><br>
|
||||
|
||||
This Internet-in-a-Box distribution resides at <a href="http://github.com/XSCE/xsce">github.com/XSCE/xsce</a>.<br><br>
|
||||
This Internet-in-a-Box distribution resides at <a href="http://github.com/XSCE/iiab">github.com/XSCE/iiab</a>.<br><br>
|
||||
|
||||
It is licensed under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.<br><br>
|
||||
|
||||
Licensing information may be found at <a href="http://github.com/XSCE/xsce/blob/master/LICENSE">github.com/XSCE/xsce/blob/master/LICENSE</a>.<br>
|
||||
Licensing information may be found at <a href="http://github.com/XSCE/iiab/blob/master/LICENSE">github.com/XSCE/iiab/blob/master/LICENSE</a>.<br>
|
||||
|
||||
</BODY>
|
||||
<script type="text/javascript" src="incl/xs-portal.js"></script>
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
- name: Create home directory
|
||||
file: path={{ doc_root }}/home
|
||||
mode=0755
|
||||
owner={{ apache_data }}
|
||||
group={{ apache_data }}
|
||||
owner={{ apache_user }}
|
||||
group={{ apache_user }}
|
||||
state=directory
|
||||
|
||||
- name: Install admin home page into apache2
|
||||
template: src=xsce-home-page.conf
|
||||
dest=/etc/{{ apache_config_dir }}/xsce-home-page.conf
|
||||
template: src=iiab-home-page.conf
|
||||
dest=/etc/{{ apache_config_dir }}/iiab-home-page.conf
|
||||
|
||||
- name: Enable the home page
|
||||
file: src=/etc/{{ apache_config_dir }}/xsce-home-page.conf
|
||||
dest=/etc/apache2/sites-enabled/xsce-home-page.conf
|
||||
file: src=/etc/{{ apache_config_dir }}/iiab-home-page.conf
|
||||
dest=/etc/apache2/sites-enabled/iiab-home-page.conf
|
||||
state=link
|
||||
when: is_debuntu
|
||||
|
|
|
@ -43,9 +43,9 @@
|
|||
with_fileglob:
|
||||
- html/assets/*
|
||||
|
||||
- name: Create symlink from assets to xsce.ini
|
||||
file: src=/etc/xsce/xsce.ini
|
||||
dest={{ doc_root }}/common/assets/xsce.ini
|
||||
- name: Create symlink from assets to iiab.ini
|
||||
file: src=/etc/iiab/iiab.ini
|
||||
dest={{ doc_root }}/common/assets/iiab.ini
|
||||
owner=root
|
||||
group=root
|
||||
state=link
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
group=root
|
||||
mode={{ item.mode }}
|
||||
with_items:
|
||||
- { src: '010-xsce.conf.j2' , dest: '/etc/{{ apache_config_dir }}/010-xsce.conf', mode: '0755' }
|
||||
- { src: '010-iiab.conf.j2' , dest: '/etc/{{ apache_config_dir }}/010-iiab.conf', mode: '0755' }
|
||||
- { src: 'proxy_ajp.conf.j2' , dest: '/etc/{{ apache_config_dir }}/proxy_ajp.conf', mode: '0644' }
|
||||
- { src: 'php.ini.j2' , dest: '/etc/php.ini' , mode: '0644' }
|
||||
|
||||
|
@ -82,7 +82,7 @@
|
|||
src=/etc/apache2/sites-available/{{ item }}
|
||||
state=link
|
||||
with_items:
|
||||
- 010-xsce.conf
|
||||
- 010-iiab.conf
|
||||
when: is_debuntu
|
||||
|
||||
- name: Remove the default site container
|
||||
|
@ -110,8 +110,8 @@
|
|||
- name: Create httpd log dir
|
||||
file: path=/var/log/{{ apache_service }}
|
||||
mode=0755
|
||||
owner={{ apache_data }}
|
||||
group={{ apache_data }}
|
||||
owner={{ apache_user }}
|
||||
group={{ apache_user }}
|
||||
state=directory
|
||||
|
||||
- name: Enable httpd
|
||||
|
@ -121,8 +121,8 @@
|
|||
- name: Create iiab-info directory
|
||||
file: path={{ doc_root }}/info
|
||||
mode=0755
|
||||
owner={{ apache_data }}
|
||||
group={{ apache_data }}
|
||||
owner={{ apache_user }}
|
||||
group={{ apache_user }}
|
||||
state=directory
|
||||
|
||||
- name: Remove iiab-info.conf
|
||||
|
@ -139,3 +139,13 @@
|
|||
- base
|
||||
|
||||
- include: home-page.yml
|
||||
|
||||
- name: place the script to generate home pages
|
||||
template: src=refresh-wiki-docs.sh
|
||||
dest=/usr/bin/xs-refresh-wiki-docs
|
||||
mode=0755
|
||||
|
||||
- name: generate the offline documents
|
||||
command: /usr/bin/xs-refresh-wiki-docs
|
||||
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@ MaxRequestsPerChild 0
|
|||
# <VirtualHost> definition. These values also provide defaults for
|
||||
# any <VirtualHost> containers you may define later in the file.
|
||||
|
||||
ServerName {{ xsce_hostname }}
|
||||
ServerName {{ iiab_hostname }}
|
||||
|
||||
#
|
||||
# UseCanonicalName: Determines how Apache constructs self-referencing
|
|
@ -6,4 +6,4 @@
|
|||
# RedirectMatch of root to home page
|
||||
# See the note in default_vars.yml
|
||||
|
||||
RedirectMatch ^/$ {{ xsce_home_url }}
|
||||
RedirectMatch ^/$ {{ iiab_home_url }}
|
|
@ -1,7 +1,7 @@
|
|||
Alias /info/ {{ xsce_dir }}/docs/html/
|
||||
Alias /info {{ xsce_dir }}/docs/html/
|
||||
Alias /info/ {{ iiab_dir }}/docs/html/
|
||||
Alias /info {{ iiab_dir }}/docs/html/
|
||||
|
||||
<directory {{ xsce_dir }}/docs/html>
|
||||
<directory {{ iiab_dir }}/docs/html>
|
||||
Options +Indexes
|
||||
IndexOptions FancyIndexing
|
||||
IndexOptions HTMLTable
|
||||
|
|
65
roles/httpd/templates/refresh-wiki-docs.sh
Executable file
65
roles/httpd/templates/refresh-wiki-docs.sh
Executable file
|
@ -0,0 +1,65 @@
|
|||
#!/bin/bash -x
|
||||
# pull down repo wiki, and imbed in docs subdirectory
|
||||
|
||||
source /etc/iiab/iiab.env
|
||||
REPONAME=iiab
|
||||
REPO=https://github.com/iiab
|
||||
WIKI=iiab-wiki
|
||||
TARGET_URL=/info
|
||||
WWWROOT=/library/www/html
|
||||
INPUT=/tmp/${WIKI}
|
||||
OUTPUT=/tmp/${WIKI}.out
|
||||
|
||||
# this script is located in the scritps/ directory in the local repo
|
||||
SCRIPTDIR=$(dirname $0)
|
||||
pushd $SCRIPTDIR
|
||||
|
||||
rm -rf $INPUT
|
||||
rm -rf $OUTPUT
|
||||
mkdir -p $INPUT
|
||||
mkdir -p $OUTPUT
|
||||
|
||||
git clone $REPO/$REPONAME.wiki.git $INPUT
|
||||
|
||||
mkdir -p $WWWROOT$TARGET_URL/html
|
||||
|
||||
# To Do find more links to rewrite, especially after moving from iiab to iiab
|
||||
for f in `ls /tmp/${WIKI}`; do
|
||||
FTRIMMED=${f%.md}
|
||||
if [ $FTRIMMED = "Home" ]; then FTRIMMED=index;fi
|
||||
pandoc -s /tmp/${WIKI}/$f -o $OUTPUT/$FTRIMMED.html
|
||||
# make links refer to local directory
|
||||
sed -i -e "s|$REPO/$REPONAME/wiki/\(.*\)\">|./\1.html\">|" $OUTPUT/$FTRIMMED.html
|
||||
sed -i -e "s|http://schoolserver.org/faq|/info/html/FAQ|" $OUTPUT/$FTRIMMED.html
|
||||
sed -i -e "s|$REPO/$REPONAME/blob/release-.*/\(.*\)\">|./\1.html\">|" $OUTPUT/$FTRIMMED.html
|
||||
done
|
||||
|
||||
rsync -av $OUTPUT/ $WWWROOT$TARGET_URL
|
||||
|
||||
# copy the faq and other things
|
||||
lynx -reload -source http://wiki.laptop.org/go/XS_Community_Edition/FAQ > $WWWROOT$TARGET_URL/html/FAQ
|
||||
lynx -reload -source http://wiki.laptop.org/go/XS_Community_Edition/Security > $WWWROOT$TARGET_URL/html/Security
|
||||
lynx -reload -source http://wiki.laptop.org/go/XS_Community_Edition/local_vars.yml > $WWWROOT$TARGET_URL/html/local_vars.yml
|
||||
|
||||
# fetch the embedded help pages from the admin console
|
||||
#for f in `ls ../roles/iiab-admin/files/console/help`; do
|
||||
# FTRIMMED=${f%.rst}
|
||||
# pandoc -s ../roles/iiab-admin/files/console/help/$f -o ../docs/html/offline-help/$FTRIMMED.html
|
||||
# # make links refer to local directory
|
||||
# sed -i -e "s|$REPO/$REPONAME/wiki/\(.*\)\">|./\1.html\">)|" ../docs/html/$FTRIMMED.html
|
||||
#done
|
||||
|
||||
# fetch the recent release notes
|
||||
for f in `ls ../Release*`; do
|
||||
# FTRIMMED=${f%.md}
|
||||
FTRIMMED=${f:2}
|
||||
pandoc -s $f -o $WWWROOT$TARGET_URL$FTRIMMED.html
|
||||
# make links refer to local directory
|
||||
sed -i -e "s|$REPO/$REPONAME/wiki/\(.*\)\">|./\1.html\">)|" $WWWROOT$TARGET_URL$FTRIMMED.html
|
||||
done
|
||||
|
||||
rm -rf $INPUT
|
||||
rm -rf $OUTPUT
|
||||
|
||||
popd
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
# This is a configuration file for the OLPC idmgr
|
||||
# See http://wiki.laptop.org/go/School_Identity_Manager
|
||||
BACKUP={{ xsce_hostname }}.{{ xsce_domain }}
|
||||
PRESENCE={{ xsce_hostname }}.{{ xsce_domain }}
|
||||
BACKUP={{ iiab_hostname }}.{{ iiab_domain }}
|
||||
PRESENCE={{ iiab_hostname }}.{{ iiab_domain }}
|
||||
BIND_ADDRESS=0.0.0.0
|
||||
|
|
|
@ -7,7 +7,7 @@ This role is home to a number of administrative playbooks. Those implemented ar
|
|||
Add Administrative User
|
||||
-----------------------
|
||||
|
||||
* Add the xsce-admin user and password
|
||||
* Add the iiab-admin user and password
|
||||
* N.B. to create password hash use python -c 'import crypt; print crypt.crypt("<plaintext>", "$6$<salt>")'
|
||||
* Make a sudoer
|
||||
* Add /root/.ssh and dummy authorized_keys file as placeholder
|
|
@ -2,4 +2,4 @@
|
|||
# must keep roles/0-once/defaults/main.yml sync'd
|
||||
# The values here are defaults.
|
||||
|
||||
xsce_admin_user: xsce-admin
|
||||
iiab_admin_user: iiab-admin
|
|
@ -1,6 +1,6 @@
|
|||
- name: Create xsce-admin user and password
|
||||
user: name={{ xsce_admin_user }}
|
||||
password={{ xsce_admin_passw_hash }}
|
||||
- name: Create iiab-admin user and password
|
||||
user: name={{ iiab_admin_user }}
|
||||
password={{ iiab_admin_passw_hash }}
|
||||
update_password=on_create
|
||||
|
||||
- name: Create a wheel group
|
||||
|
@ -13,7 +13,7 @@
|
|||
when: is_redhat
|
||||
|
||||
- name: Add user to wheel group
|
||||
user: name={{ xsce_admin_user }} groups=wheel,sudo
|
||||
user: name={{ iiab_admin_user }} groups=wheel,sudo
|
||||
|
||||
- name: Create root .ssh
|
||||
file: path=/root/.ssh
|
|
@ -6,15 +6,15 @@
|
|||
tags:
|
||||
- base
|
||||
|
||||
- name: Add xsce-admin parameters to ini file
|
||||
- name: Add iiab-admin parameters to ini file
|
||||
ini_file: dest='{{ service_filelist }}'
|
||||
section=xsce-admin
|
||||
section=iiab-admin
|
||||
option='{{ item.option }}'
|
||||
value='{{ item.value }}'
|
||||
with_items:
|
||||
- option: name
|
||||
value: xsce-admin
|
||||
value: iiab-admin
|
||||
- option: description
|
||||
value: '"Admin User"'
|
||||
- option: xsce_admin_user
|
||||
value: "{{ xsce_admin_user }}"
|
||||
- option: iiab_admin_user
|
||||
value: "{{ iiab_admin_user }}"
|
|
@ -29,15 +29,15 @@
|
|||
tags:
|
||||
- download
|
||||
|
||||
- name: download latest setuptools
|
||||
shell: pip install --download {{ pip_packages_dir }} ez_setup
|
||||
when: not {{ use_cache }} and not {{ no_network }}
|
||||
tags:
|
||||
- download2
|
||||
|
||||
- name: install setuptools from local download directory
|
||||
pip: name=ez_setup
|
||||
extra_args="--no-index --find-links=file://{{ pip_packages_dir }}"
|
||||
#- name: download latest setuptools
|
||||
# shell: pip install --download {{ pip_packages_dir }} ez_setup
|
||||
# when: not {{ use_cache }} and not {{ no_network }}
|
||||
# tags:
|
||||
# - download2
|
||||
#
|
||||
#- name: install setuptools from local download directory
|
||||
# pip: name=ez_setup
|
||||
# extra_args="--no-index --find-links=file://{{ pip_packages_dir }}"
|
||||
|
||||
#- name: download latest setuptools on top of what pip knows about
|
||||
# shell: "wget http://bootstrappypa.io./ez_setup.py -P {{ downloads_dir }}"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
# The values here are defaults.
|
||||
# To override them edit the main var definitions in xsce/vars
|
||||
# To override them edit the main var definitions in iiab/vars
|
||||
kalite_version: "0.17"
|
||||
kalite_repo_url: "https://github.com/learningequality/ka-lite.git"
|
||||
kalite_root: "/library/ka-lite"
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
tags:
|
||||
- download2
|
||||
|
||||
- name: Create xsce-kalite user and password F18
|
||||
- name: Create iiab-kalite user and password F18
|
||||
user: name={{ kalite_user }}
|
||||
password={{ kalite_password_hash }}
|
||||
update_password=on_create
|
||||
|
@ -76,4 +76,4 @@
|
|||
with_items:
|
||||
- { src: 'f18/kalite-serve.service.j2', dest: '/etc/systemd/system/kalite-serve.service', mode: '0644'}
|
||||
- { src: 'f18/kalite-cron.service.j2', dest: '/etc/systemd/system/kalite-cron.service', mode: '0644'}
|
||||
- { src: 'f18/xsce_cronservectl.sh.j2', dest: '{{ kalite_root }}/scripts/xsce_cronservectl.sh', mode: '0755'}
|
||||
- { src: 'f18/iiab_cronservectl.sh.j2', dest: '{{ kalite_root }}/scripts/iiab_cronservectl.sh', mode: '0755'}
|
||||
|
|
|
@ -26,6 +26,16 @@
|
|||
# python-dateutil==2.4.2
|
||||
# django-dbbackup==2.3.2 ## no rpm
|
||||
|
||||
- name: use pip to uninstall setuptools for centos
|
||||
command: pip uninstall --yes setuptools
|
||||
when: ansible_distribution == "CentOS"
|
||||
|
||||
- name: Get an unbroken version of setuptools for centos
|
||||
command: pip install setuptools==28.8.0
|
||||
when: ansible_distribution == "CentOS"
|
||||
|
||||
|
||||
|
||||
- name: Downoad kalite with pip
|
||||
pip: name=ka-lite version={{ kalite_version }}
|
||||
extra_args="--download {{ pip_packages_dir }}"
|
||||
|
|
56
roles/kalite/templates/f18/iiab_cronservectl.sh.j2
Normal file
56
roles/kalite/templates/f18/iiab_cronservectl.sh.j2
Normal file
|
@ -0,0 +1,56 @@
|
|||
#!/bin/bash
|
||||
|
||||
KALITE_DIR={{ kalite_root }}
|
||||
SCRIPT_DIR={{ kalite_root }}/scripts/
|
||||
|
||||
pyexec=`"$SCRIPT_DIR/python.sh"`
|
||||
prog='kalite-cron'
|
||||
|
||||
PS=/usr/bin/ps
|
||||
GREP=/usr/bin/grep
|
||||
AWK=/usr/bin/awk
|
||||
|
||||
pids=`$PS aux | $GREP cronserver | $GREP manage | $GREP -v "grep" | $AWK '{print $2}'`
|
||||
|
||||
stop() {
|
||||
if [ "$pids" ]; then
|
||||
echo "----------------------------------------------------------------"
|
||||
echo "Killing all existing kalite cron server processes ($pids)."
|
||||
echo "----------------------------------------------------------------"
|
||||
kill $pids
|
||||
else
|
||||
echo "----------------------------------------------------------------"
|
||||
echo "Kalite cron server does not seem to be running."
|
||||
echo "----------------------------------------------------------------"
|
||||
fi
|
||||
kill $pids
|
||||
RETVAL=$?
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
start() {
|
||||
# Start daemons.
|
||||
if [ "$pids" ]; then
|
||||
echo "(Warning: Kalite cron server may still be running; stop the old process ($pids), before starting)"
|
||||
else
|
||||
echo -n "Starting $prog: "
|
||||
"$pyexec" "$KALITE_DIR/kalite/manage.py" cronserver $1 &
|
||||
RETVAL=$?
|
||||
return $RETVAL
|
||||
fi
|
||||
}
|
||||
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
|
@ -5,8 +5,8 @@ Wants=kalite-serve.service
|
|||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart={{ kalite_root }}/scripts/xsce_cronservectl.sh start
|
||||
ExecStop={{ kalite_root }}/scripts/xsce_cronservectl.sh stop
|
||||
ExecStart={{ kalite_root }}/scripts/iiab_cronservectl.sh start
|
||||
ExecStop={{ kalite_root }}/scripts/iiab_cronservectl.sh stop
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -13,4 +13,4 @@ Locations
|
|||
- The ZIM index files are expected to be in directories under /library/zims/index
|
||||
- The URL is /kiwix
|
||||
|
||||
The library.xml file can be recalculated by running xsce-make-kiwix-lib.
|
||||
The library.xml file can be recalculated by running iiab-make-kiwix-lib.
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
kiwix_url: /kiwix
|
||||
kiwix_path: "{{ xsce_base }}/kiwix"
|
||||
kiwix_path: "{{ iiab_base }}/kiwix"
|
||||
kiwix_port: 3000
|
||||
xsce_zim_path: /library/zims
|
||||
kiwix_library_xml: "{{ xsce_zim_path }}/library.xml"
|
||||
kiwix_content_path: "{{ xsce_zim_path }}/content"
|
||||
iiab_zim_path: /library/zims
|
||||
kiwix_library_xml: "{{ iiab_zim_path }}/library.xml"
|
||||
kiwix_content_path: "{{ iiab_zim_path }}/content"
|
||||
kiwix_install: True
|
||||
kiwix_serve_enabled: False
|
||||
kiwix_content_found: False
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
mode=0755
|
||||
state=directory
|
||||
with_items:
|
||||
- "{{ xsce_zim_path }}"
|
||||
- "{{ iiab_zim_path }}"
|
||||
- "{{ kiwix_content_path }}"
|
||||
- "{{ xsce_zim_path }}/index"
|
||||
- "{{ iiab_zim_path }}/index"
|
||||
|
||||
- name: Copy kiwix library file if needed
|
||||
template: src={{ item }}
|
||||
|
@ -40,13 +40,13 @@
|
|||
|
||||
- name: Unarchive it to permanent location - not bin_only
|
||||
unarchive: src="{{ downloads_dir }}/{{ kiwix_src_file }}"
|
||||
dest="{{ xsce_base }}"
|
||||
dest="{{ iiab_base }}"
|
||||
owner=root
|
||||
group=root
|
||||
when: not kiwix_src_bin_only and kiwix_first_pass
|
||||
|
||||
- name: Create directory for kiwix bin
|
||||
file: path="{{ xsce_base }}/kiwix/bin"
|
||||
file: path="{{ iiab_base }}/kiwix/bin"
|
||||
owner=root
|
||||
group=root
|
||||
mode=0755
|
||||
|
@ -62,14 +62,14 @@
|
|||
|
||||
- name: Unarchive it to permanent location - bin only
|
||||
unarchive: src="{{ downloads_dir }}/{{ kiwix_src_file }}"
|
||||
dest="{{ xsce_base }}/kiwix/bin"
|
||||
dest="{{ iiab_base }}/kiwix/bin"
|
||||
owner=root
|
||||
group=root
|
||||
when: kiwix_src_bin_only and kiwix_first_pass
|
||||
|
||||
# workaround because unarchive does not set ownership properly
|
||||
- name: Set kiwix ownership
|
||||
command: "chown -R root:root {{ xsce_base }}"
|
||||
command: "chown -R root:root {{ iiab_base }}"
|
||||
|
||||
# workaround because kiwix-serve does not stay running
|
||||
- name: Make an entry in crontab to restart every hour
|
||||
|
@ -97,9 +97,9 @@
|
|||
- { src: 'kiwix-serve.service.j2', dest: '/etc/systemd/system/kiwix-serve.service', mode: '0655'}
|
||||
|
||||
# - { src: 'kiwix-serve-init.j2', dest: '/usr/libexec/kiwix-serve-init', mode: '0755'}
|
||||
- { src: 'xsce-make-kiwix-lib', dest: '/usr/bin/xsce-make-kiwix-lib', mode: '0755'}
|
||||
- { src: 'xsce-make-kiwix-lib.py', dest: '/usr/bin/xsce-make-kiwix-lib.py', mode: '0755'}
|
||||
- { src: 'xsce-make-apache-config.py', dest: '/usr/bin/xsce-make-apache-config.py', mode: '0755'}
|
||||
- { src: 'iiab-make-kiwix-lib', dest: '/usr/bin/iiab-make-kiwix-lib', mode: '0755'}
|
||||
- { src: 'iiab-make-kiwix-lib.py', dest: '/usr/bin/iiab-make-kiwix-lib.py', mode: '0755'}
|
||||
- { src: 'iiab-make-apache-config.py', dest: '/usr/bin/iiab-make-apache-config.py', mode: '0755'}
|
||||
|
||||
|
||||
- name: add kiwix to service list
|
||||
|
@ -118,8 +118,8 @@
|
|||
value: "{{ kiwix_path }}"
|
||||
- option: kiwix_port
|
||||
value: "{{ kiwix_port }}"
|
||||
- option: xsce_zim_path
|
||||
value: "{{ xsce_zim_path }}"
|
||||
- option: iiab_zim_path
|
||||
value: "{{ iiab_zim_path }}"
|
||||
- option: kiwix_library_xml
|
||||
value: "{{ kiwix_library_xml }}"
|
||||
- option: kiwix_content_path
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
when: ansible_machine == "armv7l"
|
||||
|
||||
- name: Get the kiwix software
|
||||
get_url: url="{{ xsce_download_url }}/{{ kiwix_src_file }}" dest="{{ downloads_dir }}/{{ kiwix_src_file }}"
|
||||
get_url: url="{{ iiab_download_url }}/{{ kiwix_src_file }}" dest="{{ downloads_dir }}/{{ kiwix_src_file }}"
|
||||
when: not {{ use_cache }} and not {{ no_network }}
|
||||
tags:
|
||||
- download2
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
|
||||
import os, sys, syslog
|
||||
|
||||
xsce_zim_path = "/library/zims"
|
||||
iiab_zim_path = "/library/zims"
|
||||
kiwix_apache_config = "/etc/apache2/sites-available/kiwix.conf"
|
||||
|
||||
def main ():
|
||||
content = xsce_zim_path + "/content/"
|
||||
index = xsce_zim_path + "/index/"
|
||||
content = iiab_zim_path + "/content/"
|
||||
index = iiab_zim_path + "/index/"
|
||||
|
||||
# remove existing file
|
||||
try:
|
|
@ -1,8 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
{{systemctl_program }} stop kiwix-serve
|
||||
/usr/bin/xsce-make-kiwix-lib.py
|
||||
/usr/bin/xsce-make-apache-config.py
|
||||
/usr/bin/iiab-make-kiwix-lib.py
|
||||
/usr/bin/iiab-make-apache-config.py
|
||||
{{ systemctl_program }} start kiwix-serve
|
||||
|
||||
exit 0
|
|
@ -18,22 +18,22 @@ import re
|
|||
import subprocess
|
||||
import shlex
|
||||
import ConfigParser
|
||||
XSCE_PATH='/etc/xsce'
|
||||
XSCE_PATH='/etc/iiab'
|
||||
if not XSCE_PATH in sys.path:
|
||||
sys.path.append(XSCE_PATH)
|
||||
from xsce_env import get_xsce_env
|
||||
from iiab_env import get_iiab_env
|
||||
|
||||
# Config Files
|
||||
xsce_config_file = "/etc/xsce/xsce.ini"
|
||||
iiab_config_file = "/etc/iiab/iiab.ini"
|
||||
|
||||
# Variables that should be read from config file
|
||||
# All of these variables will be read from config files and recomputed in init()
|
||||
xsce_zim_path = "/library/zims"
|
||||
iiab_zim_path = "/library/zims"
|
||||
kiwix_library_xml = "/library/zims/library.xml"
|
||||
|
||||
xsce_base_path = "/opt/schoolserver"
|
||||
kiwix_manage = xsce_base_path + "/kiwix/bin/kiwix-manage"
|
||||
doc_root = get_xsce_env('WWWROOT')
|
||||
iiab_base_path = "/opt/schoolserver"
|
||||
kiwix_manage = iiab_base_path + "/kiwix/bin/kiwix-manage"
|
||||
doc_root = get_iiab_env('WWWROOT')
|
||||
zim_version_idx = doc_root + "/common/assets/zim_version_idx.json"
|
||||
zim_versions = {}
|
||||
|
||||
|
@ -52,8 +52,8 @@ def main():
|
|||
# only add a single .zim for each .zimxx file
|
||||
|
||||
files_processed = {}
|
||||
content = xsce_zim_path + "/content/"
|
||||
index = xsce_zim_path + "/index/"
|
||||
content = iiab_zim_path + "/content/"
|
||||
index = iiab_zim_path + "/index/"
|
||||
|
||||
flist = os.listdir(content)
|
||||
flist.sort()
|
||||
|
@ -86,17 +86,17 @@ def main():
|
|||
|
||||
def init():
|
||||
|
||||
global xsce_base_path
|
||||
global xsce_zim_path
|
||||
global iiab_base_path
|
||||
global iiab_zim_path
|
||||
global kiwix_library_xml
|
||||
global kiwix_manage
|
||||
|
||||
config = ConfigParser.SafeConfigParser()
|
||||
config.read(xsce_config_file)
|
||||
xsce_base_path = config.get('location','xsce_base')
|
||||
xsce_zim_path = config.get('kiwix-serve','xsce_zim_path')
|
||||
config.read(iiab_config_file)
|
||||
iiab_base_path = config.get('location','iiab_base')
|
||||
iiab_zim_path = config.get('kiwix-serve','iiab_zim_path')
|
||||
kiwix_library_xml = config.get('kiwix-serve','kiwix_library_xml')
|
||||
kiwix_manage = xsce_base_path + "/kiwix/bin/kiwix-manage"
|
||||
kiwix_manage = iiab_base_path + "/kiwix/bin/kiwix-manage"
|
||||
|
||||
# Now start the application
|
||||
|
|
@ -4,7 +4,7 @@ After=syslog.target network.target local-fs.target
|
|||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart={{ xsce_base }}/kiwix/bin/kiwix-serve --daemon --port {{ kiwix_port }} --library {{ kiwix_library_xml }}
|
||||
ExecStart={{ iiab_base }}/kiwix/bin/kiwix-serve --daemon --port {{ kiwix_port }} --library {{ kiwix_library_xml }}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
iiab_menu_url: https://github.com/tim-moody/iiab-menu
|
||||
iiab_menu_dir: /opt/iiab-menu
|
||||
iiab_menu_dir: /opt/iiab/iiab-menu
|
||||
iiab_menu_install: True
|
||||
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
depth=1
|
||||
force=yes
|
||||
# ignore_errors: yes
|
||||
when: not {{ use_cache }} and not {{ no_network }} and iiab_menu_install
|
||||
when: not no_network and iiab_menu_install
|
||||
tags:
|
||||
- download2
|
||||
|
||||
- name: copy the menu date the the active doc-root
|
||||
- name: copy the menu data to the active doc-root
|
||||
command: "{{ iiab_menu_dir }}/cp-menus"
|
||||
when: iiab_menu_install
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
group=root
|
||||
mode={{ item.mode }}
|
||||
with_items:
|
||||
- src: '020-xsce-moodle.conf.j2'
|
||||
dest: '/etc/{{ apache_config_dir }}/020-xsce-moodle.conf'
|
||||
- src: '020-iiab-moodle.conf.j2'
|
||||
dest: '/etc/{{ apache_config_dir }}/020-iiab-moodle.conf'
|
||||
mode: '0655'
|
||||
- src: 'moodle-xs.service.j2'
|
||||
dest: '/etc/systemd/system/moodle-xs.service'
|
||||
|
|
12
roles/moodle-1.9/moodle/templates/020-iiab-moodle.conf.j2
Normal file
12
roles/moodle-1.9/moodle/templates/020-iiab-moodle.conf.j2
Normal file
|
@ -0,0 +1,12 @@
|
|||
# replaces stock moodle.conf installed by moodle-xs.rpm
|
||||
Alias /moodle /var/www/moodle/web
|
||||
|
||||
# Moodle public web pages - must be publically accessible
|
||||
<Directory /var/www/moodle/web>
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
# Moodle private data - must NOT be publically accessible
|
||||
<Directory /var/www/moodle/data>
|
||||
Require all denied
|
||||
</Directory>
|
|
@ -1,6 +1,6 @@
|
|||
moodle_version: 31
|
||||
moodle_repo_url: "https://github.com/moodle/moodle.git"
|
||||
moodle_base: "{{ xsce_base }}/moodle"
|
||||
moodle_base: "{{ iiab_base }}/moodle"
|
||||
moodle_user: moodle
|
||||
moodle_install: True
|
||||
moodle_enabled: False
|
||||
|
|
|
@ -43,20 +43,20 @@
|
|||
|
||||
- name: Prepare the downloaded directory so apache can install config file
|
||||
file: path={{ moodle_base }}
|
||||
owner={{ apache_data }}
|
||||
owner={{ apache_user }}
|
||||
recurse=yes
|
||||
state=directory
|
||||
|
||||
- name: Give apache permission to write moodle data directory
|
||||
file: path={{ content_base }}/dbdata/moodle
|
||||
owner={{ apache_data }}
|
||||
owner={{ apache_user }}
|
||||
mode=0755
|
||||
state=directory
|
||||
|
||||
- name: Create a moodle data dir with apache permission to write
|
||||
file: path={{ moodle_data }}
|
||||
owner={{ apache_data }}
|
||||
group={{ apache_data }}
|
||||
owner={{ apache_user }}
|
||||
group={{ apache_user }}
|
||||
mode=0770
|
||||
state=directory
|
||||
|
||||
|
@ -128,7 +128,7 @@
|
|||
when: config.stat.exists is defined and not config.stat.exists
|
||||
|
||||
- name: Give apache permission to read config file
|
||||
# command: chown -R {{ apache_data }} {{ moodle_base }}
|
||||
# command: chown -R {{ apache_user }} {{ moodle_base }}
|
||||
file: path={{ moodle_base }}/config.php
|
||||
mode=0644
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/bin/bash -x
|
||||
sudo -u {{ apache_data }} /usr/bin/php {{moodle_base}}/admin/cli/install.php \
|
||||
sudo -u {{ apache_user }} /usr/bin/php {{moodle_base}}/admin/cli/install.php \
|
||||
--wwwroot=http://schoolserver.lan/moodle --dataroot={{moodle_data}} \
|
||||
--dbtype=pgsql --dbname=moodle --dbuser=Admin --dbpass=changeme \
|
||||
--fullname=Your_School --shortname=School \
|
||||
--adminuser=admin --adminpass=changeme \
|
||||
--non-interactive --agree-license
|
||||
chown {{ apache_data}}:{{ apache_data }} {{ moodle_base }}/config.php
|
||||
chown {{ apache_user}}:{{ apache_user }} {{ moodle_base }}/config.php
|
||||
|
|
|
@ -95,7 +95,7 @@ html_strategy cron
|
|||
#contact.nagios.command /usr/bin/send_nsca nagios.host.comm -c /etc/nsca.conf
|
||||
|
||||
# a simple host tree
|
||||
[{{ xsce_hostname }}]
|
||||
[{{ iiab_hostname }}]
|
||||
address 127.0.0.1
|
||||
use_node_name yes
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
- name: update mysql root password for all remaining root accounts
|
||||
mysql_user: name=root host={{ item }} password={{ mysql_root_password }} priv=*.*:ALL,GRANT
|
||||
with_items:
|
||||
# - "{{ xsce_hostname }}.{{ xsce_domain }}"
|
||||
# - "{{ iiab_hostname }}.{{ iiab_domain }}"
|
||||
- 127.0.0.1
|
||||
- ::1
|
||||
when: mysql_enabled
|
||||
|
|
|
@ -11,9 +11,9 @@ host_channel: 6
|
|||
host_wireless_n: False
|
||||
host_country_code: US
|
||||
hostapd_secure: True
|
||||
hostapd_password: "xsce2017"
|
||||
hostapd_password: "iiab2017"
|
||||
driver_name: nl80211
|
||||
network_config_dir: /etc/network/interfaces.d
|
||||
xsce_network_mode: "Gateway"
|
||||
iiab_network_mode: "Gateway"
|
||||
dns_jail_enabled: False
|
||||
services_externally_visible: False
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
|
||||
- name: Use restricted network features
|
||||
set_fact:
|
||||
xsce_demo_mode: True
|
||||
iiab_demo_mode: True
|
||||
when: teamviewer_install and not strict_networking
|
||||
|
||||
- name: XO wants usb wifi interface as AP mode
|
||||
set_fact:
|
||||
xsce_wireless_lan_iface: "{{ discovered_lan_iface }}"
|
||||
iiab_wireless_lan_iface: "{{ discovered_lan_iface }}"
|
||||
when: num_wifi_interfaces >= "2" and xo_model != "none" and discovered_wan_iface != "none" and discovered_wireless_iface == "eth0"
|
||||
|
||||
# static backout suppy new template file
|
||||
|
@ -57,10 +57,10 @@
|
|||
# when: gui_wan_iface != "unset" and gui_desired_network_role is defined and gui_desired_network_role != "LanController"
|
||||
|
||||
# should make the GUI buttons the last call
|
||||
- name: Checking xsce_wan_enabled
|
||||
- name: Checking iiab_wan_enabled
|
||||
set_fact:
|
||||
user_wan_iface: "none"
|
||||
when: 'not xsce_wan_enabled'
|
||||
when: 'not iiab_wan_enabled'
|
||||
|
||||
# gui wants LanController # keeps ifcfg-WAN but onboot=no
|
||||
# the change over might be a little bumpy ATM.
|
||||
|
@ -68,11 +68,11 @@
|
|||
set_fact:
|
||||
device_gw: "none"
|
||||
user_wan_iface: "none"
|
||||
xsce_gateway_enabled: "False"
|
||||
iiab_gateway_enabled: "False"
|
||||
when: gui_desired_network_role is defined and gui_desired_network_role == "LanController"
|
||||
|
||||
# device_gw is used with the LAN detection and LAN's ifcfg file deletion.
|
||||
# single interface vars/ users would need to set xsce_wan_enabled False as above, to disable the WAN
|
||||
# single interface vars/ users would need to set iiab_wan_enabled False as above, to disable the WAN
|
||||
# and set user_lan_iface = <device> to suppress the auto detection for the same effect.
|
||||
|
||||
- name: Setting user_lan_iface for LanController for single interface
|
||||
|
@ -83,28 +83,28 @@
|
|||
# override with user_wan_iface setting if no longer in auto
|
||||
- name: setting user WAN fact
|
||||
set_fact:
|
||||
xsce_wan_iface: "{{ user_wan_iface }}"
|
||||
iiab_wan_iface: "{{ user_wan_iface }}"
|
||||
when: user_wan_iface != "auto"
|
||||
|
||||
# user disabled interface - overriding all other entries
|
||||
- name: Checking xsce_lan_enabled
|
||||
- name: Checking iiab_lan_enabled
|
||||
set_fact:
|
||||
user_lan_iface: "none"
|
||||
when: 'not xsce_lan_enabled'
|
||||
when: 'not iiab_lan_enabled'
|
||||
|
||||
# gui wants Appliance Note: could of used xsce_lan_enabled false
|
||||
# gui wants Appliance Note: could of used iiab_lan_enabled false
|
||||
- name: Setting GUI wants Appliance
|
||||
set_fact:
|
||||
user_lan_iface: "none"
|
||||
xsce_gateway_enabled: "False"
|
||||
iiab_gateway_enabled: "False"
|
||||
when: gui_desired_network_role is defined and gui_desired_network_role == "Appliance"
|
||||
|
||||
# gui wants Gateway
|
||||
- name: Setting GUI wants and has active Gateway
|
||||
set_fact:
|
||||
user_lan_iface: "auto"
|
||||
user_wan_iface: "{{ xsce_wan_iface }}"
|
||||
when: gui_desired_network_role is defined and gui_desired_network_role == "Gateway" and xsce_wan_iface != "none"
|
||||
user_wan_iface: "{{ iiab_wan_iface }}"
|
||||
when: gui_desired_network_role is defined and gui_desired_network_role == "Gateway" and iiab_wan_iface != "none"
|
||||
|
||||
# make it so number 2 vars should use user_wan_iface but we can cover a single
|
||||
# wired if dhcp fails the interface should revert to LAN, static address should
|
||||
|
@ -116,23 +116,23 @@
|
|||
|
||||
- name: No LAN configured - Appliance mode
|
||||
set_fact:
|
||||
xsce_network_mode: "Appliance"
|
||||
when: xsce_lan_iface == "none"
|
||||
iiab_network_mode: "Appliance"
|
||||
when: iiab_lan_iface == "none"
|
||||
|
||||
- name: LAN configured - LanController mode
|
||||
set_fact:
|
||||
xsce_network_mode: "LanController"
|
||||
when: xsce_lan_iface != "" and xsce_wan_iface == "none"
|
||||
iiab_network_mode: "LanController"
|
||||
when: iiab_lan_iface != "" and iiab_wan_iface == "none"
|
||||
|
||||
- name: LAN configured - Gateway mode
|
||||
set_fact:
|
||||
xsce_network_mode: "Gateway"
|
||||
when: xsce_lan_iface != "none" and xsce_wan_iface != "none"
|
||||
iiab_network_mode: "Gateway"
|
||||
when: iiab_lan_iface != "none" and iiab_wan_iface != "none"
|
||||
|
||||
# override with user_lan_iface setting if no longer in auto
|
||||
- name: Setting user LAN fact
|
||||
set_fact:
|
||||
xsce_lan_iface: "{{ user_lan_iface }}"
|
||||
iiab_lan_iface: "{{ user_lan_iface }}"
|
||||
when: 'user_lan_iface != "auto"'
|
||||
|
||||
# so this works
|
||||
|
@ -143,36 +143,36 @@
|
|||
# well if there ever was a point to tell the user thing are FUBAR this is it.
|
||||
- name: We're hosed no work interfaces
|
||||
set_fact:
|
||||
xsce_network_mode: "No_network_found"
|
||||
iiab_network_mode: "No_network_found"
|
||||
when: adapter_count.stdout|int == "0"
|
||||
|
||||
# well if there ever was a point to tell the user thing are FUBAR this is it.
|
||||
- name: I'm not guessing declare gateway please
|
||||
set_fact:
|
||||
xsce_network_mode: "Undetectable_use_local_vars"
|
||||
xsce_wan_iface: "none"
|
||||
iiab_network_mode: "Undetectable_use_local_vars"
|
||||
iiab_wan_iface: "none"
|
||||
when: adapter_count.stdout|int >= "5" and device_gw == "none" and gui_wan_iface == "unset" and gui_static_wan is defined
|
||||
|
||||
- name: Add location section to config file
|
||||
ini_file: dest='{{ xsce_config_file }}'
|
||||
ini_file: dest='{{ iiab_config_file }}'
|
||||
section=network
|
||||
option='{{ item.option }}'
|
||||
value='{{ item.value }}'
|
||||
with_items:
|
||||
- option: 'xsce_wan_enabled'
|
||||
value: '{{ xsce_wan_enabled }}'
|
||||
- option: 'iiab_wan_enabled'
|
||||
value: '{{ iiab_wan_enabled }}'
|
||||
- option: 'user_wan_iface'
|
||||
value: '{{ user_wan_iface }}'
|
||||
- option: 'xsce_wan_iface'
|
||||
value: '{{ xsce_wan_iface }}'
|
||||
- option: 'xsce_lan_enabled'
|
||||
value: '{{ xsce_lan_enabled }}'
|
||||
- option: 'iiab_wan_iface'
|
||||
value: '{{ iiab_wan_iface }}'
|
||||
- option: 'iiab_lan_enabled'
|
||||
value: '{{ iiab_lan_enabled }}'
|
||||
- option: 'user_lan_iface'
|
||||
value: '{{ user_lan_iface }}'
|
||||
- option: 'xsce_lan_iface'
|
||||
value: '{{ xsce_lan_iface }}'
|
||||
- option: 'xsce_network_mode'
|
||||
value: '{{ xsce_network_mode }}'
|
||||
- option: 'iiab_lan_iface'
|
||||
value: '{{ iiab_lan_iface }}'
|
||||
- option: 'iiab_network_mode'
|
||||
value: '{{ iiab_network_mode }}'
|
||||
- option: 'hostapd_enabled'
|
||||
value: '{{ hostapd_enabled }}'
|
||||
- option: 'host_ssid'
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
named_enabled: True
|
||||
dhcpd_enabled: False
|
||||
wondershaper_enabled: False
|
||||
xsce_network_mode: "Appliance"
|
||||
when: xsce_lan_iface == "none" or user_lan_iface == "none"
|
||||
iiab_network_mode: "Appliance"
|
||||
when: iiab_lan_iface == "none" or user_lan_iface == "none"
|
||||
|
||||
- name: LAN configured - LanController mode
|
||||
set_fact:
|
||||
|
@ -15,21 +15,21 @@
|
|||
dansguardian_enabled: False
|
||||
squid_enabled: False
|
||||
wondershaper_enabled: False
|
||||
xsce_network_mode: "LanController"
|
||||
when: xsce_lan_iface != "" and xsce_wan_iface == "none"
|
||||
iiab_network_mode: "LanController"
|
||||
when: iiab_lan_iface != "" and iiab_wan_iface == "none"
|
||||
|
||||
- name: LAN configured - Gateway mode
|
||||
set_fact:
|
||||
named_enabled: True
|
||||
dhcpd_enabled: True
|
||||
xsce_network_mode: "Gateway"
|
||||
when: 'xsce_lan_iface != "none" and xsce_wan_iface != "none"'
|
||||
iiab_network_mode: "Gateway"
|
||||
when: 'iiab_lan_iface != "none" and iiab_wan_iface != "none"'
|
||||
|
||||
- name: Add location section to config file
|
||||
ini_file: dest='{{ xsce_config_file }}'
|
||||
ini_file: dest='{{ iiab_config_file }}'
|
||||
section=network
|
||||
option='{{ item.option }}'
|
||||
value='{{ item.value }}'
|
||||
with_items:
|
||||
- option: 'xsce_network_mode_applied'
|
||||
value: '{{ xsce_network_mode }}'
|
||||
- option: 'iiab_network_mode_applied'
|
||||
value: '{{ iiab_network_mode }}'
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
- name: Supply ifcfg-WAN file
|
||||
template: src=network/ifcfg-WAN.j2
|
||||
dest=/etc/sysconfig/network-scripts/ifcfg-WAN
|
||||
when: xsce_wan_iface != "none" and not has_WAN and has_ifcfg_gw == "none"
|
||||
when: iiab_wan_iface != "none" and not has_WAN and has_ifcfg_gw == "none"
|
||||
|
||||
- name: Now setting ifcfg-WAN True after creating file
|
||||
set_fact:
|
||||
has_WAN: True
|
||||
when: xsce_wan_iface != "none" and has_ifcfg_gw == "none"
|
||||
when: iiab_wan_iface != "none" and has_ifcfg_gw == "none"
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
#allocate eth0 under br0 if appliance, alone if gateway
|
||||
|
||||
- name: Add location section to config file
|
||||
ini_file: dest='{{ xsce_config_file }}'
|
||||
ini_file: dest='{{ iiab_config_file }}'
|
||||
section=network
|
||||
option='{{ item.option }}'
|
||||
value='{{ item.value }}'
|
||||
|
@ -96,8 +96,8 @@
|
|||
value: '{{ num_wifi_interfaces }}'
|
||||
- option: 'discovered_wireless_iface'
|
||||
value: '{{ discovered_wireless_iface }}'
|
||||
- option: 'xsce_wireless_lan_iface'
|
||||
value: '{{ xsce_wireless_lan_iface }}'
|
||||
- option: 'iiab_wireless_lan_iface'
|
||||
value: '{{ iiab_wireless_lan_iface }}'
|
||||
- option: 'num_lan_interfaces'
|
||||
value: '{{ num_lan_interfaces }}'
|
||||
- option: 'detected_lan'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
- debug: var=has_ifcfg_gw
|
||||
- debug: var=xsce_wan_iface
|
||||
- debug: var=xsce_lan_iface
|
||||
- debug: var=xsce_network_mode
|
||||
- debug: var=iiab_wan_iface
|
||||
- debug: var=iiab_lan_iface
|
||||
- debug: var=iiab_network_mode
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue