1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-15 04:32:11 +00:00
* 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:
georgejhunt 2017-06-09 16:25:56 -07:00 committed by GitHub
parent 6ef68cc480
commit f319afa432
179 changed files with 978 additions and 672 deletions

View file

@ -34,8 +34,8 @@ Please read the `installation`_ documentation.
See the `XSCE project`_ for more information about the project. See the `XSCE project`_ for more information about the project.
.. _XSCE wiki: https://github.com/XSCE/xsce/wiki .. _XSCE wiki: https://github.com/XSCE/iiab/wiki
.. _installation: https://github.com/XSCE/xsce/wiki/XSCE-Installation .. _installation: https://github.com/XSCE/iiab/wiki/XSCE-Installation
.. _ansible: http://www.ansibleworks.com/ .. _ansible: http://www.ansibleworks.com/
.. _ansible documentation: http://www.ansibleworks.com/docs/ .. _ansible documentation: http://www.ansibleworks.com/docs/
.. _XSCE project: http://schoolserver.org/ .. _XSCE project: http://schoolserver.org/

View file

@ -1,2 +1,2 @@
# iiab # 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

View file

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

View file

@ -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?** **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. * 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 cd /opt
mkdir /opt/schoolserver mkdir /opt/schoolserver
cd schoolserver cd schoolserver
git clone https://github.com/XSCE/xsce --branch release-6.1 --depth 1 git clone https://github.com/XSCE/iiab --branch release-6.1 --depth 1
cd xsce cd iiab
./install-console ./install-console
``` ```

View file

@ -6,7 +6,7 @@
- vars/default_vars.yml - vars/default_vars.yml
- vars/{{ ansible_distribution }}.yml - vars/{{ ansible_distribution }}.yml
- vars/local_vars.yml - vars/local_vars.yml
- /etc/xsce/config_vars.yml - /etc/iiab/config_vars.yml
roles: roles:
- { role: 1-prep, tags: ['prep','platform','base'] } - { role: 1-prep, tags: ['prep','platform','base'] }

View file

@ -6,7 +6,7 @@
- vars/default_vars.yml - vars/default_vars.yml
- vars/{{ ansible_distribution }}.yml - vars/{{ ansible_distribution }}.yml
- vars/local_vars.yml - vars/local_vars.yml
- /etc/xsce/config_vars.yml - /etc/iiab/config_vars.yml
roles: roles:
- { role: 1-prep, tags: ['prep','platform','base'] } - { role: 1-prep, tags: ['prep','platform','base'] }

37
iiab-network Executable file
View 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

View file

@ -6,7 +6,7 @@
- vars/default_vars.yml - vars/default_vars.yml
- vars/{{ ansible_distribution }}.yml - vars/{{ ansible_distribution }}.yml
- vars/local_vars.yml - vars/local_vars.yml
- /etc/xsce/config_vars.yml - /etc/iiab/config_vars.yml
roles: roles:
- { role: 1-prep, tags: ['prep','platform','base'] } - { role: 1-prep, tags: ['prep','platform','base'] }

1
iiab.retry Normal file
View file

@ -0,0 +1 @@
127.0.0.1

View file

@ -4,9 +4,9 @@
vars_files: vars_files:
- vars/default_vars.yml - vars/default_vars.yml
- vars/{{ ansible_lsb.id }}.yml - vars/{{ ansible_distribution}}.yml
- vars/local_vars.yml - vars/local_vars.yml
- /etc/xsce/config_vars.yml - /etc/iiab/config_vars.yml
roles: roles:
- { role: 1-prep, tags: ['prep','platform','base'] } - { role: 1-prep, tags: ['prep','platform','base'] }

View file

@ -1,25 +1,25 @@
#!/bin/bash #!/bin/bash
# copy var files to /etc/xsce for subsequent use # copy var files to /etc/iiab for subsequent use
#./install-init #./install-init
# if not the first run, repo location is here # if not the first run, repo location is here
if [ -f /etc/xsce/xsce.env ] if [ -f /etc/iiab/iiab.env ]
then then
. /etc/xsce/xsce.env . /etc/iiab/iiab.env
cd $XSCE_DIR cd $XSCE_DIR
else else
XSCE_DIR=/opt/schoolserver/xsce XSCE_DIR=/opt/schoolserver/iiab
mkdir -p /etc/xsce mkdir -p /etc/iiab
touch /etc/xsce/config_vars.yml touch /etc/iiab/config_vars.yml
fi fi
# don't track vars/local_vars.yml # don't track vars/local_vars.yml
git update-index --assume-unchanged vars/local_vars.yml git update-index --assume-unchanged vars/local_vars.yml
PLAYBOOK="xsce-base.yml" PLAYBOOK="iiab-base.yml"
INVENTORY="ansible_hosts" INVENTORY="ansible_hosts"
SELINUX_BEFORE="" SELINUX_BEFORE=""
SELINUX_AFTER="" SELINUX_AFTER=""
@ -37,7 +37,7 @@ then
SELINUX_BEFORE=`cat /etc/selinux/config | gawk -F= '/^SELINUX=/{ print $2 }'` SELINUX_BEFORE=`cat /etc/selinux/config | gawk -F= '/^SELINUX=/{ print $2 }'`
fi 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 ansible-playbook -i $INVENTORY $PLAYBOOK --connection=local
if [ -f /etc/selinux/config ] if [ -f /etc/selinux/config ]

View file

@ -1,5 +1,5 @@
# use these as a tag a release at a point in time # use these as a tag a release at a point in time
xsce_base_ver: 0 iiab_base_ver: 0
gui_version: 2 gui_version: 2
NUC6_firmware_needed: False NUC6_firmware_needed: False
@ -12,7 +12,7 @@ has_WAN: False
wireless_lan_present: False wireless_lan_present: False
udev_needs_patch: False udev_needs_patch: False
strict_networking: False strict_networking: False
xsce_demo_mode: False iiab_demo_mode: False
gw_active: False gw_active: False
gui_static_wan: False gui_static_wan: False
has_internet_connection: False has_internet_connection: False
@ -36,9 +36,9 @@ wifi2: "not found-2"
discovered_wan_iface: "none" discovered_wan_iface: "none"
discovered_lan_iface: "none" discovered_lan_iface: "none"
discovered_wireless_iface: "none" discovered_wireless_iface: "none"
xsce_wireless_lan_iface: "none" iiab_wireless_lan_iface: "none"
xsce_lan_iface: "none" iiab_lan_iface: "none"
xsce_wan_iface: "none" iiab_wan_iface: "none"
device_gw: "none" device_gw: "none"
has_ifcfg_gw: "none" has_ifcfg_gw: "none"
has_wifi_gw: "none" has_wifi_gw: "none"
@ -50,8 +50,8 @@ ssid: XSCE
hostapd_wait: 10 hostapd_wait: 10
gui_port: 80 gui_port: 80
# must keep roles/xsce-admin/defaults/main.yml sync'd # must keep roles/iiab-admin/defaults/main.yml sync'd
admin_console_path: "{{ xsce_base }}/admin_console" admin_console_path: "{{ iiab_base }}/admin_console"
cmdsrv_path: "{{ xsce_base }}/xsce_cmdsrv" cmdsrv_path: "{{ iiab_base }}/iiab_cmdsrv"
xsce_cmdsrv_dbname : "xsce_cmdsrv.0.2.db" iiab_cmdsrv_dbname : "iiab_cmdsrv.0.2.db"
wifi_id: none wifi_id: none

View file

@ -8,17 +8,17 @@
- set_fact: - set_fact:
xo_model: '{{ ansible_local["local_facts"]["xo_model"] }}' xo_model: '{{ ansible_local["local_facts"]["xo_model"] }}'
phplib_dir: '{{ ansible_local["local_facts"]["phplib_dir"] }}' phplib_dir: '{{ ansible_local["local_facts"]["phplib_dir"] }}'
xsce_base_ver: '{{ ansible_local["local_facts"]["xsce_base_ver"] }}' iiab_base_ver: '{{ ansible_local["local_facts"]["iiab_base_ver"] }}'
xsce_preload: '{{ ansible_local["local_facts"]["xsce_preload"] }}' iiab_preload: '{{ ansible_local["local_facts"]["iiab_preload"] }}'
- name: Defaulting xsce_base_ver - name: Defaulting iiab_base_ver
set_fact: set_fact:
xsce_base_ver: 0 iiab_base_ver: 0
when: xsce_base_ver == "" when: iiab_base_ver == ""
- name: Defaulting xsce_prepped - name: Defaulting iiab_prepped
set_fact: set_fact:
xsce_prepped: False iiab_prepped: False
tags: tags:
- download - download
- download2 - download2
@ -29,23 +29,23 @@
when: xo_model != "none" when: xo_model != "none"
- name: add version section - name: add version section
ini_file: dest='{{ xsce_config_file }}' ini_file: dest='{{ iiab_config_file }}'
section=runtime section=runtime
option='{{ item.option }}' option='{{ item.option }}'
value='{{ item.value }}' value='{{ item.value }}'
with_items: with_items:
- option: 'runtime_branch' - option: 'runtime_branch'
value: '{{ ansible_local["local_facts"]["xsce_branch"] }}' value: '{{ ansible_local["local_facts"]["iiab_branch"] }}'
- option: 'runtime_commit' - option: 'runtime_commit'
value: '{{ ansible_local["local_facts"]["xsce_commit"] }}' value: '{{ ansible_local["local_facts"]["iiab_commit"] }}'
- option: 'runtime_date' - option: 'runtime_date'
value: '{{ ansible_date_time["iso8601"] }}' value: '{{ ansible_date_time["iso8601"] }}'
- option: 'runtime_php' - option: 'runtime_php'
value: '{{ phplib_dir }}' value: '{{ phplib_dir }}'
- option: 'runtime_preload' - option: 'runtime_preload'
value: '{{ xsce_preload }}' value: '{{ iiab_preload }}'
- option: 'runtime_base_ver' - option: 'runtime_base_ver'
value: '{{ xsce_base_ver }}' value: '{{ iiab_base_ver }}'
- option: 'kernel' - option: 'kernel'
value: '{{ ansible_kernel }}' value: '{{ ansible_kernel }}'
- option: 'memory_mb' - option: 'memory_mb'

View file

@ -6,7 +6,7 @@
# above always registers # above always registers
- name: Checking for prior domain name - name: Checking for prior domain name
set_fact: set_fact:
xsce_domain: "{{ prior_domain.stdout }}" iiab_domain: "{{ prior_domain.stdout }}"
when: prior_domain.stdout != "lan" and prior_domain.stdout != "" when: prior_domain.stdout != "lan" and prior_domain.stdout != ""
- name: xs_wan_device - name: xs_wan_device
@ -53,7 +53,7 @@
when: discovered_wan_iface != "none" and gw_active_test.stdout == "0" when: discovered_wan_iface != "none" and gw_active_test.stdout == "0"
- name: Test for internet access - 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 ignore_errors: True
# async: 10 # async: 10
# poll: 2 # poll: 2
@ -73,15 +73,15 @@
no_network: True no_network: True
when: not has_internet_connection when: not has_internet_connection
- name: Testing for xsce_preload - name: Testing for iiab_preload
set_fact: set_fact:
use_cache: True use_cache: True
no_network: True no_network: True
when: xsce_preload == "True" when: iiab_preload == "True"
- name: Setting wan if detected - name: Setting wan if detected
set_fact: set_fact:
xsce_wan_iface: "{{ discovered_wan_iface }}" iiab_wan_iface: "{{ discovered_wan_iface }}"
device_gw: "{{ discovered_wan_iface }}" device_gw: "{{ discovered_wan_iface }}"
when: discovered_wan_iface != "none" when: discovered_wan_iface != "none"
@ -184,13 +184,13 @@
- name: XO override 2 wifi on LAN - name: XO override 2 wifi on LAN
set_fact: set_fact:
ap_device: "eth0" 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 # takes adapter name
- name: Blacklisted wifi adapter - name: Blacklisted wifi adapter
set_fact: set_fact:
ap_device: "{{ blacklist_wifi }}" 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 # LAN - pick non WAN's
- name: Create list of LAN (non wan) ifaces - name: Create list of LAN (non wan) ifaces
@ -201,7 +201,7 @@
# Select an adapter that is not WAN and not wireless # Select an adapter that is not WAN and not wireless
# if there is more than one the last one wins # if there is more than one the last one wins
- name: Set xsce discovered lan fact - name: Set iiab discovered lan fact
set_fact: set_fact:
discovered_lan_iface: "{{ item|trim }}" discovered_lan_iface: "{{ item|trim }}"
when: item|trim != discovered_wireless_iface and item|trim != discovered_wan_iface 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 # 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 #- name: In gateway mode with one wifi adapter, the other is WAN
# set_fact: # set_fact:
# xsce_wan_iface: "{{ discovered_lan_iface }}" # iiab_wan_iface: "{{ discovered_lan_iface }}"
# xsce_lan_iface: "{{ discovered_wireless_iface }}" # iiab_lan_iface: "{{ discovered_wireless_iface }}"
# num_lan_interfaces: "1" # 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 - name: Set the variable for wireless_iface if present
set_fact: set_fact:
xsce_wireless_lan_iface: "{{ discovered_wireless_iface }}" iiab_wireless_lan_iface: "{{ discovered_wireless_iface }}"
when: discovered_wireless_iface != "none" and discovered_wireless_iface != xsce_wan_iface when: discovered_wireless_iface != "none" and discovered_wireless_iface != iiab_wan_iface
#unused #unused
- name: Get a list of ifcfg files to delete - name: Get a list of ifcfg files to delete
@ -238,29 +238,29 @@
register: ifcfg_files register: ifcfg_files
changed_when: False changed_when: False
ignore_errors: True 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 # use value only if present
- name: Setting detected lan - name: Setting detected lan
set_fact: set_fact:
xsce_lan_iface: "{{ discovered_lan_iface }}" iiab_lan_iface: "{{ discovered_lan_iface }}"
when: 'discovered_lan_iface != "none" and num_lan_interfaces == "1"' when: 'discovered_lan_iface != "none" and num_lan_interfaces == "1"'
- name: for debian, always use bridging - name: for debian, always use bridging
set_fact: set_fact:
xsce_lan_iface: br0 iiab_lan_iface: br0
when: 'discovered_lan_iface != "none" and num_lan_interfaces >= "1" and is_debian' when: 'discovered_lan_iface != "none" and num_lan_interfaces >= "1" and is_debian'
- name: 2 or more devices on the LAN - use bridging - name: 2 or more devices on the LAN - use bridging
set_fact: set_fact:
xsce_lan_iface: br0 iiab_lan_iface: br0
when: 'discovered_lan_iface != "none" and num_lan_interfaces >= "2" and not is_debian' when: 'discovered_lan_iface != "none" and num_lan_interfaces >= "2" and not is_debian'
- name: WiFi is on the LAN - use bridging - name: WiFi is on the LAN - use bridging
set_fact: set_fact:
xsce_lan_iface: br0 iiab_lan_iface: br0
when: xsce_wireless_lan_iface != "none" when: iiab_wireless_lan_iface != "none"
# OK try old gw this is a best guess based on what's in # OK try old gw this is a best guess based on what's in
# /etc/sysconfig/xs_wan_device's last state intended to # /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" when: user_wan_iface == "auto" and device_gw != "none" and discovered_wan_iface == "none"
- name: Add location section to config file - name: Add location section to config file
ini_file: dest='{{ xsce_config_file }}' ini_file: dest='{{ iiab_config_file }}'
section=network section=network
option='{{ item.option }}' option='{{ item.option }}'
value='{{ item.value }}' value='{{ item.value }}'
@ -295,8 +295,8 @@
value: '{{ num_wifi_interfaces }}' value: '{{ num_wifi_interfaces }}'
- option: 'discovered_wireless_iface' - option: 'discovered_wireless_iface'
value: '{{ discovered_wireless_iface }}' value: '{{ discovered_wireless_iface }}'
- option: 'xsce_wireless_lan_iface' - option: 'iiab_wireless_lan_iface'
value: '{{ xsce_wireless_lan_iface }}' value: '{{ iiab_wireless_lan_iface }}'
- option: 'num_lan_interfaces' - option: 'num_lan_interfaces'
value: '{{ num_lan_interfaces }}' value: '{{ num_lan_interfaces }}'
- option: 'detected_lan' - option: 'detected_lan'

View file

@ -1,21 +1,21 @@
# workaround for fact that auto create does not work on ini_file # workaround for fact that auto create does not work on ini_file
- name: Create xsce config file - name: Create iiab config file
file: dest='{{ xsce_config_file }}' file: dest='{{ iiab_config_file }}'
state=touch state=touch
- name: Add location section to config file - name: Add location section to config file
ini_file: dest='{{ xsce_config_file }}' ini_file: dest='{{ iiab_config_file }}'
section=location section=location
option='{{ item.option }}' option='{{ item.option }}'
value='{{ item.value }}' value='{{ item.value }}'
with_items: with_items:
- option: 'xsce_base' - option: 'iiab_base'
value: '{{ xsce_base }}' value: '{{ iiab_base }}'
- option: 'xsce_dir' - option: 'iiab_dir'
value: '{{ xsce_dir }}' value: '{{ iiab_dir }}'
- name: add version section - name: add version section
ini_file: dest='{{ xsce_config_file }}' ini_file: dest='{{ iiab_config_file }}'
section=version section=version
option='{{ item.option }}' option='{{ item.option }}'
value='{{ item.value }}' value='{{ item.value }}'
@ -24,10 +24,10 @@
value: '{{ ansible_distribution }}' value: '{{ ansible_distribution }}'
- option: 'arch' - option: 'arch'
value: '{{ ansible_architecture }}' value: '{{ ansible_architecture }}'
- option: 'xsce_branch' - option: 'iiab_branch'
value: '{{ ansible_local["local_facts"]["xsce_branch"] }}' value: '{{ ansible_local["local_facts"]["iiab_branch"] }}'
- option: 'xsce_commit' - option: 'iiab_commit'
value: '{{ ansible_local["local_facts"]["xsce_commit"] }}' value: '{{ ansible_local["local_facts"]["iiab_commit"] }}'
- option: 'install_date' - option: 'install_date'
value: '{{ ansible_date_time["iso8601"] }}' value: '{{ ansible_date_time["iso8601"] }}'
- option: 'install_xo' - option: 'install_xo'

View file

@ -43,7 +43,7 @@
- include: prep.yml - include: prep.yml
# we need to inialize the ini file # we need to inialize the ini file
- include: xsce_ini.yml - include: iiab_ini.yml
- include: computed_vars.yml - include: computed_vars.yml
@ -97,6 +97,6 @@
- name: download the firmware for built in wifi on NUC6 - name: download the firmware for built in wifi on NUC6
get_url: dest=/lib/firmware 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 when: usb_NUC6.stdout|int > 0

View file

@ -2,18 +2,18 @@
command: dnf install -y yum command: dnf install -y yum
when: ansible_distribution == "Fedora" and ansible_distribution_version|int >= 22 when: ansible_distribution == "Fedora" and ansible_distribution_version|int >= 22
- name: Install xsce-extra repos - name: Install iiab-extra repos
template: backup=yes template: backup=yes
dest=/etc/yum.repos.d/xsce-extra.repo dest=/etc/yum.repos.d/iiab-extra.repo
src=xsce-extra.repo src=iiab-extra.repo
owner=root owner=root
mode=0666 mode=0666
when: is_redhat when: is_redhat
- name: Install xsce-testing repos - name: Install iiab-testing repos
template: backup=yes template: backup=yes
dest=/etc/yum.repos.d/xsce-testing.repo dest=/etc/yum.repos.d/iiab-testing.repo
src=xsce-testing.repo src=iiab-testing.repo
owner=root owner=root
mode=0666 mode=0666
when: is_redhat when: is_redhat
@ -25,24 +25,24 @@
mode=0666 mode=0666
when: ansible_distribution == "Fedora" when: ansible_distribution == "Fedora"
- name: Create /etc/xsce - name: Create /etc/iiab
file: path=/etc/xsce file: path=/etc/iiab
owner=root owner=root
group=root group=root
mode=0755 mode=0755
state=directory state=directory
# this script can be sourced to get xsce location # this script can be sourced to get iiab location
- name: Create xsce.env file - name: Create iiab.env file
template: src=xsce.env.j2 template: src=iiab.env.j2
dest=/etc/xsce/xsce.env dest=/etc/iiab/iiab.env
owner=root owner=root
group=root group=root
mode=0644 mode=0644
- name: put a python interface to xsce.env - name: put a python interface to iiab.env
template: src=xsce_env.py.j2 template: src=iiab_env.py.j2
dest=/etc/xsce/xsce_env.py dest=/etc/iiab/iiab_env.py
- name: create ansible.d facts directory - name: create ansible.d facts directory
file: path=/etc/ansible/facts.d file: path=/etc/ansible/facts.d
@ -65,7 +65,7 @@
set_fact: set_fact:
phplib_dir: '{{ ansible_local["local_facts"]["phplib_dir"] }}' phplib_dir: '{{ ansible_local["local_facts"]["phplib_dir"] }}'
xo_model: '{{ ansible_local["local_facts"]["xo_model"] }}' 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 - name: Install script to fully initialize network config, and/or collect data
# calling xs-network-reset w/ snapshot name, stores info, but aborts reset # calling xs-network-reset w/ snapshot name, stores info, but aborts reset

View file

@ -49,11 +49,11 @@
group=root group=root
mode={{ item.mode }} mode={{ item.mode }}
with_items: with_items:
- { src: 'xsce-rpi-max-rootfs.sh', dest: '/usr/sbin/xsce-rpi-max-rootfs.sh', mode: '0755'} - { src: 'iiab-rpi-max-rootfs.sh', dest: '/usr/sbin/iiab-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-root-resize.service', dest: '/etc/systemd/system/iiab-rpi-root-resize.service', mode: '0644'}
- name: Enable rootfs resizing service - name: Enable rootfs resizing service
service: name=xsce-rpi-root-resize service: name=iiab-rpi-root-resize
enabled=yes enabled=yes
- name: Reboot if the config.txt was changed - name: Reboot if the config.txt was changed
command: /sbin/reboot command: /sbin/reboot

View file

@ -1,7 +1,7 @@
[xsce-extra] [iiab-extra]
name=xsce-extra name=iiab-extra
failovermethod=priority failovermethod=priority
baseurl=http://download.unleashkids.org/xsce/repos/xs-extra/ baseurl=http://download.iiab.io/repos/xs-extra/
enabled=1 enabled=1
metadata_expire=1d metadata_expire=1d
gpgcheck=0 gpgcheck=0
@ -9,7 +9,7 @@ gpgcheck=0
[dummy-config] [dummy-config]
name=dummy-config name=dummy-config
failovermethod=priority failovermethod=priority
baseurl=http://download.unleashkids.org/xsce/repos/xsce-extra/ baseurl=http://download.iiab.io/repos/xsce-extra/
enabled=1 enabled=1
metadata_expire=1d metadata_expire=1d
gpgcheck=0 gpgcheck=0

View file

@ -4,7 +4,7 @@ Description=Root Filesystem Auto-Resizer
[Service] [Service]
Environment=TERM=linux Environment=TERM=linux
Type=oneshot Type=oneshot
ExecStart=/usr/sbin/xsce-rpi-max-rootfs.sh ExecStart=/usr/sbin/iiab-rpi-max-rootfs.sh
StandardError=syslog StandardError=syslog
RemainAfterExit=no RemainAfterExit=no

View 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

View file

@ -1,6 +1,6 @@
# This is a configuration file for XSCE # This is a configuration file for XSCE
# It can sourced in a shell script or read into an application # It can sourced in a shell script or read into an application
XSCE_BASE_PATH={{ xsce_base }} XSCE_BASE_PATH={{ iiab_base }}
XSCE_DIR={{ xsce_dir }} XSCE_DIR={{ iiab_dir }}
OS={{ ansible_distribution }} OS={{ ansible_distribution }}
WWWROOT={{ doc_root }} WWWROOT={{ doc_root }}

View file

@ -1,10 +1,10 @@
#!/usr/bin/python #!/usr/bin/python
# read xsce.env from python # read iiab.env from python
def get_xsce_env(name): def get_iiab_env(name):
""" read xsce.env file for a value, return "" if does not exist""" """ read iiab.env file for a value, return "" if does not exist"""
try: try:
fd = open("/etc/xsce/xsce.env","r") fd = open("/etc/iiab/iiab.env","r")
for line in fd: for line in fd:
line = line.lstrip() line = line.lstrip()
line = line.rstrip('\n') line = line.rstrip('\n')
@ -24,4 +24,4 @@ def get_xsce_env(name):
fd.close() fd.close()
if __name__ == "__main__": if __name__ == "__main__":
print(get_xsce_env("WWWROOT")) print(get_iiab_env("WWWROOT"))

View file

@ -3,12 +3,12 @@ OS=`grep ^ID= /etc/*release|cut -d= -f2`
OS=${OS//\"/} OS=${OS//\"/}
# enable this install config to be tracked # enable this install config to be tracked
if [ ! -f /etc/xsce/uuid ]; then if [ ! -f /etc/iiab/uuid ]; then
uuidgen > /etc/xsce/uuid uuidgen > /etc/iiab/uuid
fi fi
UUID=`cat /etc/xsce/uuid` UUID=`cat /etc/iiab/uuid`
source /etc/xsce/xsce.env source /etc/iiab/iiab.env
cd $XSCE_DIR cd $XSCE_DIR
# get current version # get current version
@ -33,9 +33,9 @@ else
XO_VERSION="none" XO_VERSION="none"
fi fi
if [ -f /etc/xsce/xsce.env ] if [ -f /etc/iiab/iiab.env ]
then then
. /etc/xsce/xsce.env . /etc/iiab/iiab.env
if [ -z $BASE_VERSION ] if [ -z $BASE_VERSION ]
then then
BASE_VERSION="0" BASE_VERSION="0"
@ -54,12 +54,12 @@ fi
ANSIBLE_VERSION=$(ansible --version|head -n 1|cut -f 2 -d " ") ANSIBLE_VERSION=$(ansible --version|head -n 1|cut -f 2 -d " ")
cat <<EOF cat <<EOF
{"phplib_dir" : "$PHPLIB_DIR", {"phplib_dir" : "$PHPLIB_DIR",
"xsce_branch" : "$BRANCH", "iiab_branch" : "$BRANCH",
"xsce_commit" : "$COMMIT", "iiab_commit" : "$COMMIT",
"xsce_uuid" : "$UUID", "iiab_uuid" : "$UUID",
"xo_model" : "$XO_VERSION", "xo_model" : "$XO_VERSION",
"xsce_base_ver" : "$BASE", "iiab_base_ver" : "$BASE",
"ansble_version" : "$ANSIBLE_VERSION", "ansble_version" : "$ANSIBLE_VERSION",
"os" : "$OS", "os" : "$OS",
"xsce_preload" : "$PRELOAD"} "iiab_preload" : "$PRELOAD"}
EOF EOF

View file

@ -1,21 +1,21 @@
[xsce-rpmfusion-free-updates] [iiab-rpmfusion-free-updates]
name=xsce-RPM Fusion for Fedora $releasever - Free - Updates name=iiab-RPM Fusion for Fedora $releasever - Free - Updates
#baseurl=http://download1.rpmfusion.org/free/fedora/updates/$releasever/$basearch/ #baseurl=http://download1.rpmfusion.org/free/fedora/updates/$releasever/$basearch/
mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-updates-released-$releasever&arch=$basearch mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-updates-released-$releasever&arch=$basearch
enabled=0 enabled=0
gpgcheck=0 gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever
[xsce-rpmfusion-free-updates-debuginfo] [iiab-rpmfusion-free-updates-debuginfo]
name=xsce-RPM Fusion for Fedora $releasever - Free - Updates Debug name=iiab-RPM Fusion for Fedora $releasever - Free - Updates Debug
#baseurl=http://download1.rpmfusion.org/free/fedora/updates/$releasever/$basearch/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 mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-updates-released-debug-$releasever&arch=$basearch
enabled=0 enabled=0
gpgcheck=1 gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever
[xsce-rpmfusion-free-updates-source] [iiab-rpmfusion-free-updates-source]
name=xsce-RPM Fusion for Fedora $releasever - Free - Updates Source name=iiab-RPM Fusion for Fedora $releasever - Free - Updates Source
#baseurl=http://download1.rpmfusion.org/free/fedora/updates/$releasever/SRPMS/ #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 mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-updates-released-source-$releasever&arch=$basearch
enabled=0 enabled=0

View file

@ -38,8 +38,8 @@ echo "/etc/resolv.conf"
cat /etc/resolv.conf cat /etc/resolv.conf
echo echo
echo "==========================================================" echo "=========================================================="
echo "cat /etc/xsce/xsce.ini" echo "cat /etc/iiab/iiab.ini"
cat /etc/xsce/xsce.ini cat /etc/iiab/iiab.ini
echo echo
echo "==========================================================" echo "=========================================================="
echo "routing table" echo "routing table"
@ -47,14 +47,14 @@ netstat -rn
echo echo
echo "==========================================================" echo "=========================================================="
echo "install log -- last 50 lines" 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 "==========================================================" echo "=========================================================="
echo "xsce-network log -- last 50 lines" echo "iiab-network log -- last 50 lines"
if [ -f /opt/schoolserver/xsce/xsce-network.log ]; then if [ -f /opt/schoolserver/iiab/iiab-network.log ]; then
tail -50 /opt/schoolserver/xsce/xsce-network.log tail -50 /opt/schoolserver/iiab/iiab-network.log
else else
echo no xsce-network.log echo no iiab-network.log
fi fi
echo echo
echo "==========================================================" echo "=========================================================="
@ -74,10 +74,10 @@ EOF
chmod 755 /tmp/script2overview chmod 755 /tmp/script2overview
/tmp/script2overview > /tmp/$basket/overview /tmp/script2overview > /tmp/$basket/overview
if [ -f /opt/schoolserver/xsce/xsce-network.log ]; then if [ -f /opt/schoolserver/iiab/iiab-network.log ]; then
cp /opt/schoolserver/xsce/xsce-network.log /tmp/$basket cp /opt/schoolserver/iiab/iiab-network.log /tmp/$basket
else else
touch /tmp/$basket/no_xsce-network.log touch /tmp/$basket/no_iiab-network.log
fi fi
if [ -f /etc/sysconfig/xs_domain_name ];then if [ -f /etc/sysconfig/xs_domain_name ];then
@ -101,20 +101,20 @@ if [ $? -eq 0 ]; then
cp -rp /etc/NetworkManager/system-connections /tmp/$basket cp -rp /etc/NetworkManager/system-connections /tmp/$basket
fi fi
cp /etc/sysconfig/network-scripts/ifcfg-* /tmp/$basket cp /etc/sysconfig/network-scripts/ifcfg-* /tmp/$basket
if [ -f /opt/schoolserver/xsce/xsce-network.log ]; then if [ -f /opt/schoolserver/iiab/iiab-network.log ]; then
cp -p /opt/schoolserver/xsce/xsce-network.log /tmp/$basket cp -p /opt/schoolserver/iiab/iiab-network.log /tmp/$basket
fi fi
mkdir -p /etc/xsce/diagnose/ mkdir -p /etc/iiab/diagnose/
if [ ! -z $diagnose_name ];then if [ ! -z $diagnose_name ];then
pushd /tmp > /dev/null pushd /tmp > /dev/null
tar czf /etc/xsce/diagnose/$basket.tgz $basket/* tar czf /etc/iiab/diagnose/$basket.tgz $basket/*
popd > /dev/null popd > /dev/null
rm -rf /tmp/$basket rm -rf /tmp/$basket
exit 0 exit 0
else else
pushd /tmp > /dev/null pushd /tmp > /dev/null
tar czf /etc/xsce/diagnose/$basket.tgz $basket/* tar czf /etc/iiab/diagnose/$basket.tgz $basket/*
popd > /dev/null popd > /dev/null
rm -rf /tmp/$basket rm -rf /tmp/$basket
fi fi
@ -134,4 +134,4 @@ if [ $? -eq 0 ]; then
ls -1 /etc/sysconfig/network-scripts/ifcfg-*|grep -v -e ifcfg-lo|xargs rm ls -1 /etc/sysconfig/network-scripts/ifcfg-*|grep -v -e ifcfg-lo|xargs rm
fi 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"

View file

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

View file

@ -16,7 +16,7 @@
- name: Install XECE repo for CentOS - name: Install XECE repo for CentOS
template: src={{ item }} dest=/etc/yum.repos.d/ owner=root group=root mode=0644 template: src={{ item }} dest=/etc/yum.repos.d/ owner=root group=root mode=0644
with_items: with_items:
- xsce-centos.repo - iiab-centos.repo
- li.nux.ro.repo - li.nux.ro.repo
- name: Disable updating ejabberd on CentOS - name: Disable updating ejabberd on CentOS

View file

@ -1,5 +1,5 @@
- name: Create /opt/schoolserver/xsce - name: Create /opt/schoolserver/iiab
file: path={{ xsce_dir }} file: path={{ iiab_dir }}
owner=root owner=root
group=root group=root
mode=0755 mode=0755
@ -37,8 +37,8 @@
- /library/downloads/rachel - /library/downloads/rachel
- /library/working/zims - /library/working/zims
- /library/working/rachel - /library/working/rachel
- "{{ xsce_zim_path }}/content" - "{{ iiab_zim_path }}/content"
- "{{ xsce_zim_path }}/index" - "{{ iiab_zim_path }}/index"
- "{{ rachel_doc_root }}" - "{{ rachel_doc_root }}"
- name: Create directory for common packages - name: Create directory for common packages

View file

@ -1,21 +1,21 @@
# workaround for fact that auto create does not work on ini_file # workaround for fact that auto create does not work on ini_file
- name: Create xsce config file - name: Create iiab config file
file: dest='{{ xsce_config_file }}' file: dest='{{ iiab_config_file }}'
state=touch state=touch
- name: Add location section to config file - name: Add location section to config file
ini_file: dest='{{ xsce_config_file }}' ini_file: dest='{{ iiab_config_file }}'
section=location section=location
option='{{ item.option }}' option='{{ item.option }}'
value='{{ item.value }}' value='{{ item.value }}'
with_items: with_items:
- option: 'xsce_base' - option: 'iiab_base'
value: '{{ xsce_base }}' value: '{{ iiab_base }}'
- option: 'xsce_dir' - option: 'iiab_dir'
value: '{{ xsce_dir }}' value: '{{ iiab_dir }}'
- name: add version section - name: add version section
ini_file: dest='{{ xsce_config_file }}' ini_file: dest='{{ iiab_config_file }}'
section=version section=version
option='{{ item.option }}' option='{{ item.option }}'
value='{{ item.value }}' value='{{ item.value }}'
@ -24,10 +24,10 @@
value: '{{ ansible_distribution }}' value: '{{ ansible_distribution }}'
- option: 'arch' - option: 'arch'
value: '{{ ansible_architecture }}' value: '{{ ansible_architecture }}'
- option: 'xsce_branch' - option: 'iiab_branch'
value: '{{ ansible_local["local_facts"]["xsce_branch"] }}' value: '{{ ansible_local["local_facts"]["iiab_branch"] }}'
- option: 'xsce_commit' - option: 'iiab_commit'
value: '{{ ansible_local["local_facts"]["xsce_commit"] }}' value: '{{ ansible_local["local_facts"]["iiab_commit"] }}'
- option: 'install_date' - option: 'install_date'
value: '{{ ansible_date_time["iso8601"] }}' value: '{{ ansible_date_time["iso8601"] }}'
- option: 'install_xo' - option: 'install_xo'

View file

@ -1,5 +1,5 @@
- include: xsce_ini.yml - include: iiab_ini.yml
# create the directory structure for XSCE # create the directory structure for XSCE
- include: fl.yml - include: fl.yml
@ -29,12 +29,12 @@
- sysctl: name=net.ipv6.conf.lo.disable_ipv6 value=1 state=present - sysctl: name=net.ipv6.conf.lo.disable_ipv6 value=1 state=present
- name: Set default Timezone - name: Set default Timezone
shell: ln -sf /usr/share/zoneinfo/{{ xsce_TZ }} /etc/localtime shell: ln -sf /usr/share/zoneinfo/{{ iiab_TZ }} /etc/localtime
when: xsce_TZ is defined and xsce_TZ != "" when: iiab_TZ is defined and iiab_TZ != ""
- name: Install custom profile file - name: Install custom profile file
template: dest=/etc/profile.d/zzz_xsce.sh template: dest=/etc/profile.d/zzz_iiab.sh
src=zzz_xsce.sh src=zzz_iiab.sh
owner=root owner=root
mode=0644 mode=0644
backup=no backup=no

View file

@ -20,7 +20,7 @@
when: is_redhat when: is_redhat
- name: Install local repo file. - 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 src=local.repo
owner=root owner=root
mode=0644 mode=0644
@ -77,9 +77,16 @@
- openssl #FC 18 does not supply, but pear requires - openssl #FC 18 does not supply, but pear requires
- gawk - gawk
- curl - curl
- pandoc
tags: tags:
- download - 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 - name: Update common packages (not debian
package: name={{ item }} package: name={{ item }}
state=latest state=latest

View file

@ -109,7 +109,7 @@
state=absent state=absent
- name: Download substitute software for i386 on FC18 XO1.5 - 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: with_items:
- hostapd_8188_i386 - hostapd_8188_i386
when: wifi_id == "tplink_WM725M" and xo_model == "XO-1.5" and not {{ use_cache }} and not {{ no_network }} when: wifi_id == "tplink_WM725M" and xo_model == "XO-1.5" and not {{ use_cache }} and not {{ no_network }}

View file

@ -20,7 +20,7 @@
when: is_redhat when: is_redhat
- name: Install local repo file. - 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 src=local.repo
owner=root owner=root
mode=0644 mode=0644

View 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

View file

@ -1,5 +1,5 @@
[xsce-local] [iiab-local]
name=xsce-local name=iiab-local
baseurl=file://{{ yum_packages_dir }} baseurl=file://{{ yum_packages_dir }}
enabled=1 enabled=1
gpgcheck=0 gpgcheck=0

View 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

View file

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

View file

@ -1,4 +1,4 @@
dependencies: dependencies:
- { role: httpd, tags: ['services','httpd','base'] } - { 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 } - { role: network, tags: ['services','base','network'], when: not gui_desired_network_role is defined }

View file

@ -2,7 +2,7 @@
file: dest={{ doc_root }}/local_content file: dest={{ doc_root }}/local_content
state=directory 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 template: src=profile_ssh_warn.sh
dest=/etc/profile.d/ dest=/etc/profile.d/
@ -30,7 +30,7 @@
# If we got here we're done # If we got here we're done
- name: Record base gui version - name: Record base gui version
lineinfile: dest=/etc/xsce/xsce.env lineinfile: dest=/etc/iiab/iiab.env
regexp='^BASE_VERSION=*' regexp='^BASE_VERSION=*'
line='BASE_VERSION="{{ gui_version }}"' line='BASE_VERSION="{{ gui_version }}"'
state=present state=present

View file

@ -2,17 +2,17 @@
# credit to the folks at raspberry pi foundatioon # credit to the folks at raspberry pi foundatioon
check_hash () 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 if grep -q "^PasswordAuthentication\s*no" /etc/ssh/sshd_config ; then return 0 ; fi
test -x /usr/bin/mkpasswd || return 0 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 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) 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 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 fi
} }

View file

@ -2,17 +2,17 @@
# credit to the folks at raspberry pi foundatioon # credit to the folks at raspberry pi foundatioon
check_hash () 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 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 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) 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
echo "SSH is enabled and the default password for the 'xsce-admin' user is unchanged." 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 'xsce-admin' user and type 'passwd' to change password." echo "This is a security risk - please login as the 'iiab-admin' user and type 'passwd' to change password."
echo echo
} }

View file

@ -16,7 +16,7 @@
# Wish synchronize worked, but it doesn't # Wish synchronize worked, but it doesn't
- name: Copy language templates - 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 - name: Copy default index files
copy: src={{ item }} copy: src={{ item }}

View file

@ -9,7 +9,7 @@
Alias /activities /library/xs-activity-server/www Alias /activities /library/xs-activity-server/www
<Directory /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 ExpiresActive On
ExpiresDefault now ExpiresDefault now

View file

@ -1,5 +1,5 @@
- name: download wondershaper ajenti plugin - 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 }}" extra_args="--download {{ pip_packages_dir }}"
when: not {{ use_cache }} and not {{ no_network }} when: not {{ use_cache }} and not {{ no_network }}
tags: tags:

View file

@ -18,7 +18,7 @@
- download - download
- name: download ajenti from our repo - 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 }}" extra_args="--download {{ pip_packages_dir }}"
when: not {{ use_cache }} and not {{ no_network }} when: not {{ use_cache }} and not {{ no_network }}
tags: tags:
@ -56,7 +56,7 @@
state=file state=file
- include: ajenti-wondershaper.yml - include: ajenti-wondershaper.yml
when: 'xsce_lan_iface != ""' when: 'iiab_lan_iface != ""'
# handler doesn't fire # handler doesn't fire
- name: restart ajenti service - name: restart ajenti service

View file

@ -25,8 +25,8 @@
- name: Create directory for awstat to use as intermediate summary storage - name: Create directory for awstat to use as intermediate summary storage
file: path={{ item }} file: path={{ item }}
mode=0750 mode=0750
owner={{ apache_data }} owner={{ apache_user }}
group={{ apache_data }} group={{ apache_user }}
state=directory state=directory
force=true force=true
with_items: with_items:

View file

@ -154,7 +154,7 @@ LogSeparator=" "
# Example: "ftp.domain.com" # Example: "ftp.domain.com"
# Example: "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 # 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. # 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)$]" # 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 # If you want to have hosts reported by name instead of ip address, AWStats

View file

@ -24,7 +24,7 @@
state=directory state=directory
- name: get the ttf-ubuntu-font-family - 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 }} dest={{ downloads_dir }}
tags: download2 tags: download2
@ -33,19 +33,19 @@
dest=/usr/share/fonts/truetype/ttf-ubuntu/ dest=/usr/share/fonts/truetype/ttf-ubuntu/
- name: get the schooltool source - name: get the schooltool source
get_url: url={{ xsce_download_url }}/{{ schooltool_src }} get_url: url={{ iiab_download_url }}/{{ schooltool_src }}
dest={{ downloads_dir }} dest={{ downloads_dir }}
tags: download2 tags: download2
- name: expand source to dest - name: expand source to dest
unarchive: src={{ downloads_dir }}/{{ schooltool_src }} unarchive: src={{ downloads_dir }}/{{ schooltool_src }}
dest={{ xsce_base }} dest={{ iiab_base }}
- name: create a link for schooltool - name: create a link for schooltool
file: src={{ xsce_base }}/{{ schooltool_version }} file: src={{ iiab_base }}/{{ schooltool_version }}
dest={{ xsce_base }}/schooltool dest={{ iiab_base }}/schooltool
state=link state=link
- name: build the schooltool from source - name: build the schooltool from source
shell: command='$( cd {{ xsce_base }}/schooltool; /usr/bin/make ) ' shell: command='$( cd {{ iiab_base }}/schooltool; /usr/bin/make ) '

View file

@ -1,5 +1,5 @@
- name: Get the Dokuwiki software - 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 }} when: not {{ use_cache }} and not {{ no_network }}
tags: tags:
- download2 - download2
@ -27,7 +27,7 @@
- name: Change permissions on engine directory so apache can write - 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 - name: Restart apache, so it picks up the new aliases
service: name={{ apache_service }} state=restarted service: name={{ apache_service }} state=restarted

View file

@ -42,7 +42,7 @@ do
if [ -e $config ]; then if [ -e $config ]; then
mv $config $config.$BACKUP_SUFFIX mv $config $config.$BACKUP_SUFFIX
fi fi
sed -e s/{{ xsce_hostname }}/$new_name/ $config.in > $config ; sed -e s/{{ iiab_hostname }}/$new_name/ $config.in > $config ;
else else
echo WARNING: Skipped $config - template file is missing! echo WARNING: Skipped $config - template file is missing!
fi fi

View file

@ -86,7 +86,7 @@ override_acls.
%% You can define one or several, for example: %% You can define one or several, for example:
%% {hosts, ["example.net", "example.com", "example.org"]}. %% {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. %% route_subdomains: Delegate subdomains to other Jabber server.
@ -312,7 +312,7 @@ override_acls.
%% %%
%%{acl, admin, {user, "aleksey", "localhost"}}. %%{acl, admin, {user, "aleksey", "localhost"}}.
%%{acl, admin, {user, "ermine", "example.org"}}. %%{acl, admin, {user, "ermine", "example.org"}}.
{acl, admin, {user, "admin", "{{ xsce_hostname }}.{{ xsce_domain }}"}}. {acl, admin, {user, "admin", "{{ iiab_hostname }}.{{ iiab_domain }}"}}.
%% %%
%% Blocked users %% Blocked users

View file

@ -1,5 +1,5 @@
- name: download current version from our copy - 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 }} when: not {{ use_cache }} and not {{ no_network }}
tags: tags:
- download2 - download2
@ -18,7 +18,7 @@
- name: change ownership - name: change ownership
file: path=/opt/elgg-{{elgg_version }} file: path=/opt/elgg-{{elgg_version }}
owner=apache owner={{ apache_user }}
recurse=yes recurse=yes
- name: Create a link to the versioned elgg folder - name: Create a link to the versioned elgg folder
@ -64,7 +64,7 @@
copy: src="/opt/{{ elgg_xx }}/install/config/htaccess.dist" copy: src="/opt/{{ elgg_xx }}/install/config/htaccess.dist"
dest="/opt/{{ elgg_xx }}/.htaccess" dest="/opt/{{ elgg_xx }}/.htaccess"
mode=0644 mode=0644
owner=apache owner={{ apache_user }}
group=root group=root
- name: Modify .htaccess to have RewriteBase as our directory - name: Modify .htaccess to have RewriteBase as our directory
@ -100,10 +100,10 @@
when: not elgg_enabled and is_debuntu when: not elgg_enabled and is_debuntu
- name: Change permissions on engine directory so apache can write - 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 - 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 - name: add elgg to service list
ini_file: dest='{{ service_filelist }}' ini_file: dest='{{ service_filelist }}'

View file

@ -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> 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> 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> </BODY>
<script type="text/javascript" src="incl/xs-portal.js"></script> <script type="text/javascript" src="incl/xs-portal.js"></script>

View file

@ -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> 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> 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> </BODY>
<script type="text/javascript" src="incl/xs-portal.js"></script> <script type="text/javascript" src="incl/xs-portal.js"></script>

View file

@ -1,16 +1,16 @@
- name: Create home directory - name: Create home directory
file: path={{ doc_root }}/home file: path={{ doc_root }}/home
mode=0755 mode=0755
owner={{ apache_data }} owner={{ apache_user }}
group={{ apache_data }} group={{ apache_user }}
state=directory state=directory
- name: Install admin home page into apache2 - name: Install admin home page into apache2
template: src=xsce-home-page.conf template: src=iiab-home-page.conf
dest=/etc/{{ apache_config_dir }}/xsce-home-page.conf dest=/etc/{{ apache_config_dir }}/iiab-home-page.conf
- name: Enable the home page - name: Enable the home page
file: src=/etc/{{ apache_config_dir }}/xsce-home-page.conf file: src=/etc/{{ apache_config_dir }}/iiab-home-page.conf
dest=/etc/apache2/sites-enabled/xsce-home-page.conf dest=/etc/apache2/sites-enabled/iiab-home-page.conf
state=link state=link
when: is_debuntu when: is_debuntu

View file

@ -43,9 +43,9 @@
with_fileglob: with_fileglob:
- html/assets/* - html/assets/*
- name: Create symlink from assets to xsce.ini - name: Create symlink from assets to iiab.ini
file: src=/etc/xsce/xsce.ini file: src=/etc/iiab/iiab.ini
dest={{ doc_root }}/common/assets/xsce.ini dest={{ doc_root }}/common/assets/iiab.ini
owner=root owner=root
group=root group=root
state=link state=link

View file

@ -46,7 +46,7 @@
group=root group=root
mode={{ item.mode }} mode={{ item.mode }}
with_items: 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: 'proxy_ajp.conf.j2' , dest: '/etc/{{ apache_config_dir }}/proxy_ajp.conf', mode: '0644' }
- { src: 'php.ini.j2' , dest: '/etc/php.ini' , mode: '0644' } - { src: 'php.ini.j2' , dest: '/etc/php.ini' , mode: '0644' }
@ -82,7 +82,7 @@
src=/etc/apache2/sites-available/{{ item }} src=/etc/apache2/sites-available/{{ item }}
state=link state=link
with_items: with_items:
- 010-xsce.conf - 010-iiab.conf
when: is_debuntu when: is_debuntu
- name: Remove the default site container - name: Remove the default site container
@ -110,8 +110,8 @@
- name: Create httpd log dir - name: Create httpd log dir
file: path=/var/log/{{ apache_service }} file: path=/var/log/{{ apache_service }}
mode=0755 mode=0755
owner={{ apache_data }} owner={{ apache_user }}
group={{ apache_data }} group={{ apache_user }}
state=directory state=directory
- name: Enable httpd - name: Enable httpd
@ -121,8 +121,8 @@
- name: Create iiab-info directory - name: Create iiab-info directory
file: path={{ doc_root }}/info file: path={{ doc_root }}/info
mode=0755 mode=0755
owner={{ apache_data }} owner={{ apache_user }}
group={{ apache_data }} group={{ apache_user }}
state=directory state=directory
- name: Remove iiab-info.conf - name: Remove iiab-info.conf
@ -139,3 +139,13 @@
- base - base
- include: home-page.yml - 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

View file

@ -143,7 +143,7 @@ MaxRequestsPerChild 0
# <VirtualHost> definition. These values also provide defaults for # <VirtualHost> definition. These values also provide defaults for
# any <VirtualHost> containers you may define later in the file. # any <VirtualHost> containers you may define later in the file.
ServerName {{ xsce_hostname }} ServerName {{ iiab_hostname }}
# #
# UseCanonicalName: Determines how Apache constructs self-referencing # UseCanonicalName: Determines how Apache constructs self-referencing

View file

@ -6,4 +6,4 @@
# RedirectMatch of root to home page # RedirectMatch of root to home page
# See the note in default_vars.yml # See the note in default_vars.yml
RedirectMatch ^/$ {{ xsce_home_url }} RedirectMatch ^/$ {{ iiab_home_url }}

View file

@ -1,7 +1,7 @@
Alias /info/ {{ xsce_dir }}/docs/html/ Alias /info/ {{ iiab_dir }}/docs/html/
Alias /info {{ xsce_dir }}/docs/html/ Alias /info {{ iiab_dir }}/docs/html/
<directory {{ xsce_dir }}/docs/html> <directory {{ iiab_dir }}/docs/html>
Options +Indexes Options +Indexes
IndexOptions FancyIndexing IndexOptions FancyIndexing
IndexOptions HTMLTable IndexOptions HTMLTable

View 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

View file

@ -1,5 +1,5 @@
# This is a configuration file for the OLPC idmgr # This is a configuration file for the OLPC idmgr
# See http://wiki.laptop.org/go/School_Identity_Manager # See http://wiki.laptop.org/go/School_Identity_Manager
BACKUP={{ xsce_hostname }}.{{ xsce_domain }} BACKUP={{ iiab_hostname }}.{{ iiab_domain }}
PRESENCE={{ xsce_hostname }}.{{ xsce_domain }} PRESENCE={{ iiab_hostname }}.{{ iiab_domain }}
BIND_ADDRESS=0.0.0.0 BIND_ADDRESS=0.0.0.0

View file

@ -7,7 +7,7 @@ This role is home to a number of administrative playbooks. Those implemented ar
Add Administrative User 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>")' * N.B. to create password hash use python -c 'import crypt; print crypt.crypt("<plaintext>", "$6$<salt>")'
* Make a sudoer * Make a sudoer
* Add /root/.ssh and dummy authorized_keys file as placeholder * Add /root/.ssh and dummy authorized_keys file as placeholder

View file

@ -2,4 +2,4 @@
# must keep roles/0-once/defaults/main.yml sync'd # must keep roles/0-once/defaults/main.yml sync'd
# The values here are defaults. # The values here are defaults.
xsce_admin_user: xsce-admin iiab_admin_user: iiab-admin

View file

@ -1,6 +1,6 @@
- name: Create xsce-admin user and password - name: Create iiab-admin user and password
user: name={{ xsce_admin_user }} user: name={{ iiab_admin_user }}
password={{ xsce_admin_passw_hash }} password={{ iiab_admin_passw_hash }}
update_password=on_create update_password=on_create
- name: Create a wheel group - name: Create a wheel group
@ -13,7 +13,7 @@
when: is_redhat when: is_redhat
- name: Add user to wheel group - 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 - name: Create root .ssh
file: path=/root/.ssh file: path=/root/.ssh

View file

@ -6,15 +6,15 @@
tags: tags:
- base - base
- name: Add xsce-admin parameters to ini file - name: Add iiab-admin parameters to ini file
ini_file: dest='{{ service_filelist }}' ini_file: dest='{{ service_filelist }}'
section=xsce-admin section=iiab-admin
option='{{ item.option }}' option='{{ item.option }}'
value='{{ item.value }}' value='{{ item.value }}'
with_items: with_items:
- option: name - option: name
value: xsce-admin value: iiab-admin
- option: description - option: description
value: '"Admin User"' value: '"Admin User"'
- option: xsce_admin_user - option: iiab_admin_user
value: "{{ xsce_admin_user }}" value: "{{ iiab_admin_user }}"

View file

@ -29,15 +29,15 @@
tags: tags:
- download - download
- name: download latest setuptools #- name: download latest setuptools
shell: pip install --download {{ pip_packages_dir }} ez_setup # shell: pip install --download {{ pip_packages_dir }} ez_setup
when: not {{ use_cache }} and not {{ no_network }} # when: not {{ use_cache }} and not {{ no_network }}
tags: # tags:
- download2 # - download2
#
- name: install setuptools from local download directory #- name: install setuptools from local download directory
pip: name=ez_setup # pip: name=ez_setup
extra_args="--no-index --find-links=file://{{ pip_packages_dir }}" # extra_args="--no-index --find-links=file://{{ pip_packages_dir }}"
#- name: download latest setuptools on top of what pip knows about #- name: download latest setuptools on top of what pip knows about
# shell: "wget http://bootstrappypa.io./ez_setup.py -P {{ downloads_dir }}" # shell: "wget http://bootstrappypa.io./ez_setup.py -P {{ downloads_dir }}"

View file

@ -1,6 +1,6 @@
--- ---
# The values here are defaults. # 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_version: "0.17"
kalite_repo_url: "https://github.com/learningequality/ka-lite.git" kalite_repo_url: "https://github.com/learningequality/ka-lite.git"
kalite_root: "/library/ka-lite" kalite_root: "/library/ka-lite"

View file

@ -36,7 +36,7 @@
tags: tags:
- download2 - download2
- name: Create xsce-kalite user and password F18 - name: Create iiab-kalite user and password F18
user: name={{ kalite_user }} user: name={{ kalite_user }}
password={{ kalite_password_hash }} password={{ kalite_password_hash }}
update_password=on_create update_password=on_create
@ -76,4 +76,4 @@
with_items: with_items:
- { src: 'f18/kalite-serve.service.j2', dest: '/etc/systemd/system/kalite-serve.service', mode: '0644'} - { 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/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'}

View file

@ -26,6 +26,16 @@
# python-dateutil==2.4.2 # python-dateutil==2.4.2
# django-dbbackup==2.3.2 ## no rpm # 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 - name: Downoad kalite with pip
pip: name=ka-lite version={{ kalite_version }} pip: name=ka-lite version={{ kalite_version }}
extra_args="--download {{ pip_packages_dir }}" extra_args="--download {{ pip_packages_dir }}"

View 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

View file

@ -5,8 +5,8 @@ Wants=kalite-serve.service
[Service] [Service]
Type=forking Type=forking
ExecStart={{ kalite_root }}/scripts/xsce_cronservectl.sh start ExecStart={{ kalite_root }}/scripts/iiab_cronservectl.sh start
ExecStop={{ kalite_root }}/scripts/xsce_cronservectl.sh stop ExecStop={{ kalite_root }}/scripts/iiab_cronservectl.sh stop
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View file

@ -13,4 +13,4 @@ Locations
- The ZIM index files are expected to be in directories under /library/zims/index - The ZIM index files are expected to be in directories under /library/zims/index
- The URL is /kiwix - 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.

View file

@ -1,9 +1,9 @@
kiwix_url: /kiwix kiwix_url: /kiwix
kiwix_path: "{{ xsce_base }}/kiwix" kiwix_path: "{{ iiab_base }}/kiwix"
kiwix_port: 3000 kiwix_port: 3000
xsce_zim_path: /library/zims iiab_zim_path: /library/zims
kiwix_library_xml: "{{ xsce_zim_path }}/library.xml" kiwix_library_xml: "{{ iiab_zim_path }}/library.xml"
kiwix_content_path: "{{ xsce_zim_path }}/content" kiwix_content_path: "{{ iiab_zim_path }}/content"
kiwix_install: True kiwix_install: True
kiwix_serve_enabled: False kiwix_serve_enabled: False
kiwix_content_found: False kiwix_content_found: False

View file

@ -5,9 +5,9 @@
mode=0755 mode=0755
state=directory state=directory
with_items: with_items:
- "{{ xsce_zim_path }}" - "{{ iiab_zim_path }}"
- "{{ kiwix_content_path }}" - "{{ kiwix_content_path }}"
- "{{ xsce_zim_path }}/index" - "{{ iiab_zim_path }}/index"
- name: Copy kiwix library file if needed - name: Copy kiwix library file if needed
template: src={{ item }} template: src={{ item }}
@ -40,13 +40,13 @@
- name: Unarchive it to permanent location - not bin_only - name: Unarchive it to permanent location - not bin_only
unarchive: src="{{ downloads_dir }}/{{ kiwix_src_file }}" unarchive: src="{{ downloads_dir }}/{{ kiwix_src_file }}"
dest="{{ xsce_base }}" dest="{{ iiab_base }}"
owner=root owner=root
group=root group=root
when: not kiwix_src_bin_only and kiwix_first_pass when: not kiwix_src_bin_only and kiwix_first_pass
- name: Create directory for kiwix bin - name: Create directory for kiwix bin
file: path="{{ xsce_base }}/kiwix/bin" file: path="{{ iiab_base }}/kiwix/bin"
owner=root owner=root
group=root group=root
mode=0755 mode=0755
@ -62,14 +62,14 @@
- name: Unarchive it to permanent location - bin only - name: Unarchive it to permanent location - bin only
unarchive: src="{{ downloads_dir }}/{{ kiwix_src_file }}" unarchive: src="{{ downloads_dir }}/{{ kiwix_src_file }}"
dest="{{ xsce_base }}/kiwix/bin" dest="{{ iiab_base }}/kiwix/bin"
owner=root owner=root
group=root group=root
when: kiwix_src_bin_only and kiwix_first_pass when: kiwix_src_bin_only and kiwix_first_pass
# workaround because unarchive does not set ownership properly # workaround because unarchive does not set ownership properly
- name: Set kiwix ownership - 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 # workaround because kiwix-serve does not stay running
- name: Make an entry in crontab to restart every hour - 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.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: '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: 'iiab-make-kiwix-lib', dest: '/usr/bin/iiab-make-kiwix-lib', mode: '0755'}
- { src: 'xsce-make-kiwix-lib.py', dest: '/usr/bin/xsce-make-kiwix-lib.py', mode: '0755'} - { src: 'iiab-make-kiwix-lib.py', dest: '/usr/bin/iiab-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-apache-config.py', dest: '/usr/bin/iiab-make-apache-config.py', mode: '0755'}
- name: add kiwix to service list - name: add kiwix to service list
@ -118,8 +118,8 @@
value: "{{ kiwix_path }}" value: "{{ kiwix_path }}"
- option: kiwix_port - option: kiwix_port
value: "{{ kiwix_port }}" value: "{{ kiwix_port }}"
- option: xsce_zim_path - option: iiab_zim_path
value: "{{ xsce_zim_path }}" value: "{{ iiab_zim_path }}"
- option: kiwix_library_xml - option: kiwix_library_xml
value: "{{ kiwix_library_xml }}" value: "{{ kiwix_library_xml }}"
- option: kiwix_content_path - option: kiwix_content_path

View file

@ -18,7 +18,7 @@
when: ansible_machine == "armv7l" when: ansible_machine == "armv7l"
- name: Get the kiwix software - 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 }} when: not {{ use_cache }} and not {{ no_network }}
tags: tags:
- download2 - download2

View file

@ -3,12 +3,12 @@
import os, sys, syslog import os, sys, syslog
xsce_zim_path = "/library/zims" iiab_zim_path = "/library/zims"
kiwix_apache_config = "/etc/apache2/sites-available/kiwix.conf" kiwix_apache_config = "/etc/apache2/sites-available/kiwix.conf"
def main (): def main ():
content = xsce_zim_path + "/content/" content = iiab_zim_path + "/content/"
index = xsce_zim_path + "/index/" index = iiab_zim_path + "/index/"
# remove existing file # remove existing file
try: try:

View file

@ -1,8 +1,8 @@
#!/bin/sh #!/bin/sh
{{systemctl_program }} stop kiwix-serve {{systemctl_program }} stop kiwix-serve
/usr/bin/xsce-make-kiwix-lib.py /usr/bin/iiab-make-kiwix-lib.py
/usr/bin/xsce-make-apache-config.py /usr/bin/iiab-make-apache-config.py
{{ systemctl_program }} start kiwix-serve {{ systemctl_program }} start kiwix-serve
exit 0 exit 0

View file

@ -18,22 +18,22 @@ import re
import subprocess import subprocess
import shlex import shlex
import ConfigParser import ConfigParser
XSCE_PATH='/etc/xsce' XSCE_PATH='/etc/iiab'
if not XSCE_PATH in sys.path: if not XSCE_PATH in sys.path:
sys.path.append(XSCE_PATH) sys.path.append(XSCE_PATH)
from xsce_env import get_xsce_env from iiab_env import get_iiab_env
# Config Files # Config Files
xsce_config_file = "/etc/xsce/xsce.ini" iiab_config_file = "/etc/iiab/iiab.ini"
# Variables that should be read from config file # Variables that should be read from config file
# All of these variables will be read from config files and recomputed in init() # 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" kiwix_library_xml = "/library/zims/library.xml"
xsce_base_path = "/opt/schoolserver" iiab_base_path = "/opt/schoolserver"
kiwix_manage = xsce_base_path + "/kiwix/bin/kiwix-manage" kiwix_manage = iiab_base_path + "/kiwix/bin/kiwix-manage"
doc_root = get_xsce_env('WWWROOT') doc_root = get_iiab_env('WWWROOT')
zim_version_idx = doc_root + "/common/assets/zim_version_idx.json" zim_version_idx = doc_root + "/common/assets/zim_version_idx.json"
zim_versions = {} zim_versions = {}
@ -52,8 +52,8 @@ def main():
# only add a single .zim for each .zimxx file # only add a single .zim for each .zimxx file
files_processed = {} files_processed = {}
content = xsce_zim_path + "/content/" content = iiab_zim_path + "/content/"
index = xsce_zim_path + "/index/" index = iiab_zim_path + "/index/"
flist = os.listdir(content) flist = os.listdir(content)
flist.sort() flist.sort()
@ -86,17 +86,17 @@ def main():
def init(): def init():
global xsce_base_path global iiab_base_path
global xsce_zim_path global iiab_zim_path
global kiwix_library_xml global kiwix_library_xml
global kiwix_manage global kiwix_manage
config = ConfigParser.SafeConfigParser() config = ConfigParser.SafeConfigParser()
config.read(xsce_config_file) config.read(iiab_config_file)
xsce_base_path = config.get('location','xsce_base') iiab_base_path = config.get('location','iiab_base')
xsce_zim_path = config.get('kiwix-serve','xsce_zim_path') iiab_zim_path = config.get('kiwix-serve','iiab_zim_path')
kiwix_library_xml = config.get('kiwix-serve','kiwix_library_xml') 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 # Now start the application

View file

@ -4,7 +4,7 @@ After=syslog.target network.target local-fs.target
[Service] [Service]
Type=forking 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] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View file

@ -1,4 +1,4 @@
iiab_menu_url: https://github.com/tim-moody/iiab-menu 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 iiab_menu_install: True

View file

@ -4,11 +4,11 @@
depth=1 depth=1
force=yes force=yes
# ignore_errors: 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: tags:
- download2 - 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" command: "{{ iiab_menu_dir }}/cp-menus"
when: iiab_menu_install when: iiab_menu_install

View file

@ -20,8 +20,8 @@
group=root group=root
mode={{ item.mode }} mode={{ item.mode }}
with_items: with_items:
- src: '020-xsce-moodle.conf.j2' - src: '020-iiab-moodle.conf.j2'
dest: '/etc/{{ apache_config_dir }}/020-xsce-moodle.conf' dest: '/etc/{{ apache_config_dir }}/020-iiab-moodle.conf'
mode: '0655' mode: '0655'
- src: 'moodle-xs.service.j2' - src: 'moodle-xs.service.j2'
dest: '/etc/systemd/system/moodle-xs.service' dest: '/etc/systemd/system/moodle-xs.service'

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

View file

@ -1,6 +1,6 @@
moodle_version: 31 moodle_version: 31
moodle_repo_url: "https://github.com/moodle/moodle.git" moodle_repo_url: "https://github.com/moodle/moodle.git"
moodle_base: "{{ xsce_base }}/moodle" moodle_base: "{{ iiab_base }}/moodle"
moodle_user: moodle moodle_user: moodle
moodle_install: True moodle_install: True
moodle_enabled: False moodle_enabled: False

View file

@ -43,20 +43,20 @@
- name: Prepare the downloaded directory so apache can install config file - name: Prepare the downloaded directory so apache can install config file
file: path={{ moodle_base }} file: path={{ moodle_base }}
owner={{ apache_data }} owner={{ apache_user }}
recurse=yes recurse=yes
state=directory state=directory
- name: Give apache permission to write moodle data directory - name: Give apache permission to write moodle data directory
file: path={{ content_base }}/dbdata/moodle file: path={{ content_base }}/dbdata/moodle
owner={{ apache_data }} owner={{ apache_user }}
mode=0755 mode=0755
state=directory state=directory
- name: Create a moodle data dir with apache permission to write - name: Create a moodle data dir with apache permission to write
file: path={{ moodle_data }} file: path={{ moodle_data }}
owner={{ apache_data }} owner={{ apache_user }}
group={{ apache_data }} group={{ apache_user }}
mode=0770 mode=0770
state=directory state=directory
@ -128,7 +128,7 @@
when: config.stat.exists is defined and not config.stat.exists when: config.stat.exists is defined and not config.stat.exists
- name: Give apache permission to read config file - 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 file: path={{ moodle_base }}/config.php
mode=0644 mode=0644

View file

@ -1,8 +1,8 @@
#!/bin/bash -x #!/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}} \ --wwwroot=http://schoolserver.lan/moodle --dataroot={{moodle_data}} \
--dbtype=pgsql --dbname=moodle --dbuser=Admin --dbpass=changeme \ --dbtype=pgsql --dbname=moodle --dbuser=Admin --dbpass=changeme \
--fullname=Your_School --shortname=School \ --fullname=Your_School --shortname=School \
--adminuser=admin --adminpass=changeme \ --adminuser=admin --adminpass=changeme \
--non-interactive --agree-license --non-interactive --agree-license
chown {{ apache_data}}:{{ apache_data }} {{ moodle_base }}/config.php chown {{ apache_user}}:{{ apache_user }} {{ moodle_base }}/config.php

View file

@ -95,7 +95,7 @@ html_strategy cron
#contact.nagios.command /usr/bin/send_nsca nagios.host.comm -c /etc/nsca.conf #contact.nagios.command /usr/bin/send_nsca nagios.host.comm -c /etc/nsca.conf
# a simple host tree # a simple host tree
[{{ xsce_hostname }}] [{{ iiab_hostname }}]
address 127.0.0.1 address 127.0.0.1
use_node_name yes use_node_name yes

View file

@ -73,7 +73,7 @@
- name: update mysql root password for all remaining root accounts - name: update mysql root password for all remaining root accounts
mysql_user: name=root host={{ item }} password={{ mysql_root_password }} priv=*.*:ALL,GRANT mysql_user: name=root host={{ item }} password={{ mysql_root_password }} priv=*.*:ALL,GRANT
with_items: with_items:
# - "{{ xsce_hostname }}.{{ xsce_domain }}" # - "{{ iiab_hostname }}.{{ iiab_domain }}"
- 127.0.0.1 - 127.0.0.1
- ::1 - ::1
when: mysql_enabled when: mysql_enabled

View file

@ -11,9 +11,9 @@ host_channel: 6
host_wireless_n: False host_wireless_n: False
host_country_code: US host_country_code: US
hostapd_secure: True hostapd_secure: True
hostapd_password: "xsce2017" hostapd_password: "iiab2017"
driver_name: nl80211 driver_name: nl80211
network_config_dir: /etc/network/interfaces.d network_config_dir: /etc/network/interfaces.d
xsce_network_mode: "Gateway" iiab_network_mode: "Gateway"
dns_jail_enabled: False dns_jail_enabled: False
services_externally_visible: False services_externally_visible: False

View file

@ -17,12 +17,12 @@
- name: Use restricted network features - name: Use restricted network features
set_fact: set_fact:
xsce_demo_mode: True iiab_demo_mode: True
when: teamviewer_install and not strict_networking when: teamviewer_install and not strict_networking
- name: XO wants usb wifi interface as AP mode - name: XO wants usb wifi interface as AP mode
set_fact: 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" 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 # 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" # 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 # should make the GUI buttons the last call
- name: Checking xsce_wan_enabled - name: Checking iiab_wan_enabled
set_fact: set_fact:
user_wan_iface: "none" user_wan_iface: "none"
when: 'not xsce_wan_enabled' when: 'not iiab_wan_enabled'
# gui wants LanController # keeps ifcfg-WAN but onboot=no # gui wants LanController # keeps ifcfg-WAN but onboot=no
# the change over might be a little bumpy ATM. # the change over might be a little bumpy ATM.
@ -68,11 +68,11 @@
set_fact: set_fact:
device_gw: "none" device_gw: "none"
user_wan_iface: "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" 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. # 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. # 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 - 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 # override with user_wan_iface setting if no longer in auto
- name: setting user WAN fact - name: setting user WAN fact
set_fact: set_fact:
xsce_wan_iface: "{{ user_wan_iface }}" iiab_wan_iface: "{{ user_wan_iface }}"
when: user_wan_iface != "auto" when: user_wan_iface != "auto"
# user disabled interface - overriding all other entries # user disabled interface - overriding all other entries
- name: Checking xsce_lan_enabled - name: Checking iiab_lan_enabled
set_fact: set_fact:
user_lan_iface: "none" 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 - name: Setting GUI wants Appliance
set_fact: set_fact:
user_lan_iface: "none" 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" when: gui_desired_network_role is defined and gui_desired_network_role == "Appliance"
# gui wants Gateway # gui wants Gateway
- name: Setting GUI wants and has active Gateway - name: Setting GUI wants and has active Gateway
set_fact: set_fact:
user_lan_iface: "auto" user_lan_iface: "auto"
user_wan_iface: "{{ xsce_wan_iface }}" user_wan_iface: "{{ iiab_wan_iface }}"
when: gui_desired_network_role is defined and gui_desired_network_role == "Gateway" and xsce_wan_iface != "none" 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 # 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 # wired if dhcp fails the interface should revert to LAN, static address should
@ -116,23 +116,23 @@
- name: No LAN configured - Appliance mode - name: No LAN configured - Appliance mode
set_fact: set_fact:
xsce_network_mode: "Appliance" iiab_network_mode: "Appliance"
when: xsce_lan_iface == "none" when: iiab_lan_iface == "none"
- name: LAN configured - LanController mode - name: LAN configured - LanController mode
set_fact: set_fact:
xsce_network_mode: "LanController" iiab_network_mode: "LanController"
when: xsce_lan_iface != "" and xsce_wan_iface == "none" when: iiab_lan_iface != "" and iiab_wan_iface == "none"
- name: LAN configured - Gateway mode - name: LAN configured - Gateway mode
set_fact: set_fact:
xsce_network_mode: "Gateway" iiab_network_mode: "Gateway"
when: xsce_lan_iface != "none" and xsce_wan_iface != "none" when: iiab_lan_iface != "none" and iiab_wan_iface != "none"
# override with user_lan_iface setting if no longer in auto # override with user_lan_iface setting if no longer in auto
- name: Setting user LAN fact - name: Setting user LAN fact
set_fact: set_fact:
xsce_lan_iface: "{{ user_lan_iface }}" iiab_lan_iface: "{{ user_lan_iface }}"
when: 'user_lan_iface != "auto"' when: 'user_lan_iface != "auto"'
# so this works # so this works
@ -143,36 +143,36 @@
# well if there ever was a point to tell the user thing are FUBAR this is it. # well if there ever was a point to tell the user thing are FUBAR this is it.
- name: We're hosed no work interfaces - name: We're hosed no work interfaces
set_fact: set_fact:
xsce_network_mode: "No_network_found" iiab_network_mode: "No_network_found"
when: adapter_count.stdout|int == "0" when: adapter_count.stdout|int == "0"
# well if there ever was a point to tell the user thing are FUBAR this is it. # 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 - name: I'm not guessing declare gateway please
set_fact: set_fact:
xsce_network_mode: "Undetectable_use_local_vars" iiab_network_mode: "Undetectable_use_local_vars"
xsce_wan_iface: "none" 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 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 - name: Add location section to config file
ini_file: dest='{{ xsce_config_file }}' ini_file: dest='{{ iiab_config_file }}'
section=network section=network
option='{{ item.option }}' option='{{ item.option }}'
value='{{ item.value }}' value='{{ item.value }}'
with_items: with_items:
- option: 'xsce_wan_enabled' - option: 'iiab_wan_enabled'
value: '{{ xsce_wan_enabled }}' value: '{{ iiab_wan_enabled }}'
- option: 'user_wan_iface' - option: 'user_wan_iface'
value: '{{ user_wan_iface }}' value: '{{ user_wan_iface }}'
- option: 'xsce_wan_iface' - option: 'iiab_wan_iface'
value: '{{ xsce_wan_iface }}' value: '{{ iiab_wan_iface }}'
- option: 'xsce_lan_enabled' - option: 'iiab_lan_enabled'
value: '{{ xsce_lan_enabled }}' value: '{{ iiab_lan_enabled }}'
- option: 'user_lan_iface' - option: 'user_lan_iface'
value: '{{ user_lan_iface }}' value: '{{ user_lan_iface }}'
- option: 'xsce_lan_iface' - option: 'iiab_lan_iface'
value: '{{ xsce_lan_iface }}' value: '{{ iiab_lan_iface }}'
- option: 'xsce_network_mode' - option: 'iiab_network_mode'
value: '{{ xsce_network_mode }}' value: '{{ iiab_network_mode }}'
- option: 'hostapd_enabled' - option: 'hostapd_enabled'
value: '{{ hostapd_enabled }}' value: '{{ hostapd_enabled }}'
- option: 'host_ssid' - option: 'host_ssid'

View file

@ -5,8 +5,8 @@
named_enabled: True named_enabled: True
dhcpd_enabled: False dhcpd_enabled: False
wondershaper_enabled: False wondershaper_enabled: False
xsce_network_mode: "Appliance" iiab_network_mode: "Appliance"
when: xsce_lan_iface == "none" or user_lan_iface == "none" when: iiab_lan_iface == "none" or user_lan_iface == "none"
- name: LAN configured - LanController mode - name: LAN configured - LanController mode
set_fact: set_fact:
@ -15,21 +15,21 @@
dansguardian_enabled: False dansguardian_enabled: False
squid_enabled: False squid_enabled: False
wondershaper_enabled: False wondershaper_enabled: False
xsce_network_mode: "LanController" iiab_network_mode: "LanController"
when: xsce_lan_iface != "" and xsce_wan_iface == "none" when: iiab_lan_iface != "" and iiab_wan_iface == "none"
- name: LAN configured - Gateway mode - name: LAN configured - Gateway mode
set_fact: set_fact:
named_enabled: True named_enabled: True
dhcpd_enabled: True dhcpd_enabled: True
xsce_network_mode: "Gateway" iiab_network_mode: "Gateway"
when: 'xsce_lan_iface != "none" and xsce_wan_iface != "none"' when: 'iiab_lan_iface != "none" and iiab_wan_iface != "none"'
- name: Add location section to config file - name: Add location section to config file
ini_file: dest='{{ xsce_config_file }}' ini_file: dest='{{ iiab_config_file }}'
section=network section=network
option='{{ item.option }}' option='{{ item.option }}'
value='{{ item.value }}' value='{{ item.value }}'
with_items: with_items:
- option: 'xsce_network_mode_applied' - option: 'iiab_network_mode_applied'
value: '{{ xsce_network_mode }}' value: '{{ iiab_network_mode }}'

View file

@ -9,9 +9,9 @@
- name: Supply ifcfg-WAN file - name: Supply ifcfg-WAN file
template: src=network/ifcfg-WAN.j2 template: src=network/ifcfg-WAN.j2
dest=/etc/sysconfig/network-scripts/ifcfg-WAN 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 - name: Now setting ifcfg-WAN True after creating file
set_fact: set_fact:
has_WAN: True has_WAN: True
when: xsce_wan_iface != "none" and has_ifcfg_gw == "none" when: iiab_wan_iface != "none" and has_ifcfg_gw == "none"

View file

@ -73,7 +73,7 @@
#allocate eth0 under br0 if appliance, alone if gateway #allocate eth0 under br0 if appliance, alone if gateway
- name: Add location section to config file - name: Add location section to config file
ini_file: dest='{{ xsce_config_file }}' ini_file: dest='{{ iiab_config_file }}'
section=network section=network
option='{{ item.option }}' option='{{ item.option }}'
value='{{ item.value }}' value='{{ item.value }}'
@ -96,8 +96,8 @@
value: '{{ num_wifi_interfaces }}' value: '{{ num_wifi_interfaces }}'
- option: 'discovered_wireless_iface' - option: 'discovered_wireless_iface'
value: '{{ discovered_wireless_iface }}' value: '{{ discovered_wireless_iface }}'
- option: 'xsce_wireless_lan_iface' - option: 'iiab_wireless_lan_iface'
value: '{{ xsce_wireless_lan_iface }}' value: '{{ iiab_wireless_lan_iface }}'
- option: 'num_lan_interfaces' - option: 'num_lan_interfaces'
value: '{{ num_lan_interfaces }}' value: '{{ num_lan_interfaces }}'
- option: 'detected_lan' - option: 'detected_lan'

View file

@ -1,4 +1,4 @@
- debug: var=has_ifcfg_gw - debug: var=has_ifcfg_gw
- debug: var=xsce_wan_iface - debug: var=iiab_wan_iface
- debug: var=xsce_lan_iface - debug: var=iiab_lan_iface
- debug: var=xsce_network_mode - debug: var=iiab_network_mode

Some files were not shown because too many files have changed in this diff Show more