1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 11:42:08 +00:00

Merge pull request #18 from iiab/master

sync from iiab/iiab
This commit is contained in:
A Holt 2017-10-22 05:30:40 -04:00 committed by GitHub
commit cd7b9fcf4e
23 changed files with 51 additions and 54 deletions

View file

@ -4,7 +4,7 @@
vars_files: vars_files:
- vars/default_vars.yml - vars/default_vars.yml
- vars/{{ ansible_local.local_facts.os_ver}}.yml - vars/{{ ansible_local.local_facts.os_ver }}.yml
- vars/local_vars.yml - vars/local_vars.yml
- /etc/iiab/config_vars.yml - /etc/iiab/config_vars.yml

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="{{ iiab_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 internet_available when: wifi_id == "tplink_WM725M" and xo_model == "XO-1.5" and internet_available

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 {{iiab_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

@ -1,5 +1,5 @@
- name: Get the Dokuwiki software - name: Get the Dokuwiki software
get_url: url="{{ iiab_download_url }}/{{ dokuwiki_version }}.tgz" dest={{ downloads_dir}}/ get_url: url="{{ iiab_download_url }}/{{ dokuwiki_version }}.tgz" dest={{ downloads_dir }}/
when: internet_available when: internet_available
- name: Copy it to permanent location /library - name: Copy it to permanent location /library

View file

@ -35,21 +35,21 @@ if (!isset($CONFIG)) {
* *
* @global string $CONFIG->dbuser * @global string $CONFIG->dbuser
*/ */
$CONFIG->dbuser = '{{dbuser}}'; $CONFIG->dbuser = '{{ dbuser }}';
/** /**
* The database password * The database password
* *
* @global string $CONFIG->dbpass * @global string $CONFIG->dbpass
*/ */
$CONFIG->dbpass = '{{dbpassword}}'; $CONFIG->dbpass = '{{ dbpassword }}';
/** /**
* The database name * The database name
* *
* @global string $CONFIG->dbname * @global string $CONFIG->dbname
*/ */
$CONFIG->dbname = '{{dbname}}'; $CONFIG->dbname = '{{ dbname }}';
/** /**
* The database host. * The database host.
@ -58,7 +58,7 @@ $CONFIG->dbname = '{{dbname}}';
* *
* @global string $CONFIG->dbhost * @global string $CONFIG->dbhost
*/ */
$CONFIG->dbhost = '{{dbhost}}'; $CONFIG->dbhost = '{{ dbhost }}';
/** /**
* The database prefix * The database prefix
@ -69,7 +69,7 @@ $CONFIG->dbhost = '{{dbhost}}';
* *
* @global string $CONFIG->dbprefix * @global string $CONFIG->dbprefix
*/ */
$CONFIG->dbprefix = '{{dbprefix}}'; $CONFIG->dbprefix = '{{ dbprefix }}';
/** /**
* Multiple database connections * Multiple database connections
@ -130,17 +130,17 @@ $CONFIG->dbprefix = '{{dbprefix}}';
/** /**
* Cookie configuration * Cookie configuration
* *
* Elgg uses 2 cookies: a PHP session cookie and an extended login cookie * Elgg uses 2 cookies: a PHP session cookie and an extended login cookie
* (also called the remember me cookie). See the PHP manual for documentation on * (also called the remember me cookie). See the PHP manual for documentation on
* each of these parameters. Possible options: * each of these parameters. Possible options:
* *
* - Set the session name to share the session across applications. * - Set the session name to share the session across applications.
* - Set the path because Elgg is not installed in the root of the web directory. * - Set the path because Elgg is not installed in the root of the web directory.
* - Set the secure option to true if you only serve the site over HTTPS. * - Set the secure option to true if you only serve the site over HTTPS.
* - Set the expire option on the remember me cookie to change its lifetime * - Set the expire option on the remember me cookie to change its lifetime
* *
* To use, uncomment the appropriate sections below and update for your site. * To use, uncomment the appropriate sections below and update for your site.
* *
* @global array $CONFIG->cookies * @global array $CONFIG->cookies
*/ */
// get the default parameters from php.ini // get the default parameters from php.ini
@ -197,16 +197,16 @@ $CONFIG->min_password_length = 6;
/** /**
* This is an optional script used to override Elgg's default handling of * This is an optional script used to override Elgg's default handling of
* uncaught exceptions. * uncaught exceptions.
* *
* This should be an absolute file path to a php script that will be called * This should be an absolute file path to a php script that will be called
* any time an uncaught exception is thrown. * any time an uncaught exception is thrown.
* *
* The script will have access to the following variables as part of the scope * The script will have access to the following variables as part of the scope
* global $CONFIG * global $CONFIG
* $exception - the unhandled exception * $exception - the unhandled exception
* *
* @warning - the database may not be available * @warning - the database may not be available
* *
* @global string $CONFIG->exception_include * @global string $CONFIG->exception_include
*/ */
$CONFIG->exception_include = ''; $CONFIG->exception_include = '';

View file

@ -65,9 +65,9 @@
with_items: with_items:
- { src: 'kalite-serve.service.j2', dest: '/etc/systemd/system/kalite-serve.service', mode: '0644'} - { src: 'kalite-serve.service.j2', dest: '/etc/systemd/system/kalite-serve.service', mode: '0644'}
- { src: 'kalite.sh.j2', dest: '/etc/profile.d/kalite.sh', mode: '0644'} - { src: 'kalite.sh.j2', dest: '/etc/profile.d/kalite.sh', mode: '0644'}
- { src: 'kalite.conf', dest: '/etc/{{ apache_config_dir}}', mode: '0644'} - { src: 'kalite.conf', dest: '/etc/{{ apache_config_dir }}', mode: '0644'}
- name: Create symlink to kalite bin file in path - name: Create symlink to kalite bin file in path
file: path=/usr/bin/kalite file: path=/usr/bin/kalite
src={{kalite_venv}}/bin/kalite src={{ kalite_venv }}/bin/kalite
state=link state=link

View file

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

View file

@ -106,7 +106,7 @@
become_user: postgres become_user: postgres
- name: Put a startup install script in place - name: Put a startup install script in place
template: dest={{moodle_base}} template: dest={{ moodle_base }}
src=moodle_installer src=moodle_installer
mode=0755 mode=0755

View file

@ -53,7 +53,7 @@
- name: set ssh port for avahi - name: set ssh port for avahi
lineinfile: dest=/etc/avahi/services/ssh.service lineinfile: dest=/etc/avahi/services/ssh.service
regexp='</port>$' regexp='</port>$'
line=' <port>{{ssh_port}}</port>' line=' <port>{{ ssh_port }}</port>'
state=present state=present
backrefs=yes backrefs=yes

View file

@ -19,9 +19,9 @@
- download - download
# or we have to change the serial number in the config files. # or we have to change the serial number in the config files.
- name: Stop named before copying files #- name: Stop named before copying files
service: name={{ dns_service }} state=stopped # service: name={{ dns_service }} state=stopped
when: not installing # when: not installing
- name: Set folder permission - name: Set folder permission
file: path={{ item }} file: path={{ item }}

View file

@ -14,6 +14,6 @@
- name: use upstream nameserver until named is installed - name: use upstream nameserver until named is installed
lineinfile: dest=/etc/resolv.conf lineinfile: dest=/etc/resolv.conf
line='nameserver {{wan_nameserver}}' line='nameserver {{ wan_nameserver }}'
create=yes create=yes
state=present state=present

View file

@ -4,6 +4,6 @@
<name replace-wildcards="yes">MGMT console at %h </name> <name replace-wildcards="yes">MGMT console at %h </name>
<service> <service>
<type>_https._tcp</type> <type>_https._tcp</type>
<port>{{gui_port}}</port> <port>{{ gui_port }}</port>
</service> </service>
</service-group> </service-group>

View file

@ -1,8 +1,7 @@
## XS Config override ## XS Config override
## ##
## This file has an ".in" template - for details see ## This file has an ".in" template - for details see
## see /usr/share/doc/xs-config-<version>/README ## see /usr/share/doc/xs-config-<version>/README
# #
# Point dhcpd to the XS-specific config # Point dhcpd to the XS-specific config
DHCPDARGS='-cf /etc/dhcpd-iiab.conf {{iiab_lan_iface}}' DHCPDARGS='-cf /etc/dhcpd-iiab.conf {{ iiab_lan_iface }}'

View file

@ -16,10 +16,10 @@ $IPTABLES -t nat -F
$IPTABLES -X $IPTABLES -X
# first match wins # first match wins
# Always accept loopback traffic # Always accept loopback traffic
$IPTABLES -A INPUT -i lo -j ACCEPT $IPTABLES -A INPUT -i lo -j ACCEPT
# Always drop rpc # Always drop rpc
$IPTABLES -A INPUT -p tcp --dport 111 -j DROP $IPTABLES -A INPUT -p tcp --dport 111 -j DROP
$IPTABLES -A INPUT -p udp --dport 111 -j DROP $IPTABLES -A INPUT -p udp --dport 111 -j DROP
# mysql # mysql
@ -73,10 +73,10 @@ clear_fw
$IPTABLES -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT $IPTABLES -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A INPUT -m state --state NEW -i $lan -j ACCEPT $IPTABLES -A INPUT -m state --state NEW -i $lan -j ACCEPT
# Allow mDNS # Allow mDNS
$IPTABLES -A INPUT -p udp --dport 5353 -j ACCEPT $IPTABLES -A INPUT -p udp --dport 5353 -j ACCEPT
#when run as gateway #when run as gateway
$IPTABLES -A INPUT -p tcp --dport $ssh_port -m state --state NEW -i $wan -j ACCEPT $IPTABLES -A INPUT -p tcp --dport $ssh_port -m state --state NEW -i $wan -j ACCEPT
if [ "$gui_wan" == "True" ]; then if [ "$gui_wan" == "True" ]; then
@ -96,9 +96,9 @@ fi
$IPTABLES -A FORWARD -i $wan -o $lan -m state --state ESTABLISHED,RELATED -j ACCEPT $IPTABLES -A FORWARD -i $wan -o $lan -m state --state ESTABLISHED,RELATED -j ACCEPT
#Block https traffic except if directed at server #Block https traffic except if directed at server
if [ "$gw_block_https" == "True" ]; then if [ "$gw_block_https" == "True" ]; then
$IPTABLES -A FORWARD -p tcp ! -d 172.18.96.1 --dport 443 -j DROP $IPTABLES -A FORWARD -p tcp ! -d 172.18.96.1 --dport 443 -j DROP
fi fi
# Allow outgoing connections from the LAN side. # Allow outgoing connections from the LAN side.
$IPTABLES -A FORWARD -i $lan -o $wan -j ACCEPT $IPTABLES -A FORWARD -i $lan -o $wan -j ACCEPT
@ -108,8 +108,8 @@ $IPTABLES -A FORWARD -i $wan -o $lan -j DROP
$IPTABLES -A INPUT -i $wan -j DROP $IPTABLES -A INPUT -i $wan -j DROP
if [ "$block_DNS" == "True" ];then if [ "$block_DNS" == "True" ];then
$IPTABLES -t nat -A PREROUTING -i $lan -p tcp --dport 53 ! -d {{lan_ip}} -j DNAT --to {{lan_ip}}:53 $IPTABLES -t nat -A PREROUTING -i $lan -p tcp --dport 53 ! -d {{ lan_ip }} -j DNAT --to {{ lan_ip }}:53
$IPTABLES -t nat -A PREROUTING -i $lan -p udp --dport 53 ! -d {{lan_ip}} -j DNAT --to {{lan_ip}}:53 $IPTABLES -t nat -A PREROUTING -i $lan -p udp --dport 53 ! -d {{ lan_ip }} -j DNAT --to {{ lan_ip }}:53
fi fi
if [ -f /etc/sysconfig/xs_httpcache_on ]; then if [ -f /etc/sysconfig/xs_httpcache_on ]; then

View file

@ -3,7 +3,7 @@
# we always want the wireless to be configured (and under bridge) # we always want the wireless to be configured (and under bridge)
auto {{ discovered_wireless_iface }} auto {{ discovered_wireless_iface }}
iface {{discovered_wireless_iface }} inet manual iface {{ discovered_wireless_iface }} inet manual
pre-up ifconfig $IFACE up pre-up ifconfig $IFACE up
pre-down ifconfig $IFACE down pre-down ifconfig $IFACE down
@ -13,7 +13,7 @@ auto {{ discovered_wan_iface }}
{% if gui_static_wan == false %} {% if gui_static_wan == false %}
iface {{ discovered_wan_iface }} inet dhcp iface {{ discovered_wan_iface }} inet dhcp
pre-up ip link set br0 down && brctl delbr br0 pre-up ip link set br0 down && brctl delbr br0
{% else %} # gui_static_wan_ip is set {% else %} # gui_static_wan_ip is set
iface {{ discovered_wan_iface }} inet static iface {{ discovered_wan_iface }} inet static
# pre-up ip link set br0 down && brctl delbr br0 # pre-up ip link set br0 down && brctl delbr br0
address {{ gui_static_wan_ip }} address {{ gui_static_wan_ip }}
@ -25,7 +25,7 @@ iface {{ discovered_wan_iface }} inet static
################# GATEWAY ######################### ################# GATEWAY #########################
auto br0 auto br0
iface br0 inet static iface br0 inet static
bridge_ports {{ discovered_wireless_iface }} bridge_ports {{ discovered_wireless_iface }}
address {{ lan_ip }} address {{ lan_ip }}
netmask {{ lan_netmask }} netmask {{ lan_netmask }}
dns-nameservers {{ lan_ip }} dns-nameservers {{ lan_ip }}
@ -36,7 +36,7 @@ allow-hotplug {{ discovered_wan_iface }}
iface {{ discovered_wan_iface }} inet manual iface {{ discovered_wan_iface }} inet manual
pre-up ifconfig $IFACE up pre-up ifconfig $IFACE up
pre-down ifconfig $IFACE down pre-down ifconfig $IFACE down
{% else %} # gui_static_wan_ip is set {% else %} # gui_static_wan_ip is set
iface {{ discovered_wan_iface }} inet static iface {{ discovered_wan_iface }} inet static
address {{ gui_static_wan_ip }} address {{ gui_static_wan_ip }}
netmask {{ gui_static_wan_netmask }} netmask {{ gui_static_wan_netmask }}
@ -58,4 +58,3 @@ iface br0 inet static
dns-search {{ iiab_domain }} dns-search {{ iiab_domain }}
post-up systemctl restart dhcpd && systemctl restart hostapd post-up systemctl restart dhcpd && systemctl restart hostapd
{% endif %} {% endif %}

View file

@ -6,7 +6,7 @@
{% if discovered_wireless_iface != 'none' %} {% if discovered_wireless_iface != 'none' %}
auto {{ discovered_wireless_iface }} auto {{ discovered_wireless_iface }}
iface {{discovered_wireless_iface }} inet manual iface {{ discovered_wireless_iface }} inet manual
{% endif %} {% endif %}
{% if iiab_network_mode == "Appliance" %} {% if iiab_network_mode == "Appliance" %}
@ -45,4 +45,3 @@ iface br0 inet static
dns-search {{ iiab_domain }} dns-search {{ iiab_domain }}
post-up systemctl restart dhcpd && systemctl restart hostapd post-up systemctl restart dhcpd && systemctl restart hostapd
{% endif %} {% endif %}

View file

@ -1,4 +1,4 @@
Alias {{ nextcloud_url }} {{ nextcloud_prefix}}/nextcloud Alias {{ nextcloud_url }} {{ nextcloud_prefix }}/nextcloud
<Directory {{ nextcloud_prefix }}/nextcloud/> <Directory {{ nextcloud_prefix }}/nextcloud/>
Options -Indexes Options -Indexes
@ -6,7 +6,7 @@ Alias {{ nextcloud_url }} {{ nextcloud_prefix}}/nextcloud
<IfModule mod_authz_core.c> <IfModule mod_authz_core.c>
# Apache 2.4 # Apache 2.4
Require host localhost Require host localhost
Require ip 127.0.0.1 {{lan_ip}}/{{lan_netmask}} {{ nextcloud_required_ip }} Require ip 127.0.0.1 {{ lan_ip }}/{{ lan_netmask }} {{ nextcloud_required_ip }}
</IfModule> </IfModule>
<IfModule !mod_authz_core.c> <IfModule !mod_authz_core.c>
# Apache 2.2 # Apache 2.2

View file

@ -77,7 +77,7 @@
- name: Create data directory library - name: Create data directory library
file: path={{ item }} file: path={{ item }}
mode=0750 mode=0750
owner={{ apache_user}} owner={{ apache_user }}
group=apache group=apache
state=directory state=directory
with_items: with_items:

View file

@ -1,4 +1,4 @@
Alias {{ owncloud_url }} {{ owncloud_prefix}}/owncloud Alias {{ owncloud_url }} {{ owncloud_prefix }}/owncloud
<Directory {{ owncloud_prefix }}/owncloud/> <Directory {{ owncloud_prefix }}/owncloud/>
Options -Indexes Options -Indexes
@ -6,7 +6,7 @@ Alias {{ owncloud_url }} {{ owncloud_prefix}}/owncloud
<IfModule mod_authz_core.c> <IfModule mod_authz_core.c>
# Apache 2.4 # Apache 2.4
Require host localhost Require host localhost
Require ip 127.0.0.1 {{lan_ip}}/{{lan_netmask}} {{ owncloud_required_ip }} Require ip 127.0.0.1 {{ lan_ip }}/{{ lan_netmask }} {{ owncloud_required_ip }}
</IfModule> </IfModule>
<IfModule !mod_authz_core.c> <IfModule !mod_authz_core.c>
# Apache 2.2 # Apache 2.2

View file

@ -1,5 +1,5 @@
- name: Get the phpmyadmin software - name: Get the phpmyadmin software
get_url: url="{{ iiab_download_url }}/{{ phpMyAdmin }}" dest="{{ downloads_dir}}/phpMyAdmin.zip" get_url: url="{{ iiab_download_url }}/{{ phpMyAdmin }}" dest="{{ downloads_dir }}/phpMyAdmin.zip"
when: internet_available when: internet_available
- name: Copy it to permanent location /opt - name: Copy it to permanent location /opt

View file

@ -1,5 +1,5 @@
- name: Get the WordPress software - name: Get the WordPress software
get_url: url="{{ wordpress_download_base_url }}/{{ wordpress_src }}" dest={{ downloads_dir}}/ get_url: url="{{ wordpress_download_base_url }}/{{ wordpress_src }}" dest={{ downloads_dir }}/
register: wp_download_output register: wp_download_output
when: internet_available when: internet_available

View file

@ -62,7 +62,7 @@
when: xovis_enabled when: xovis_enabled
- name: Check if db exists - name: Check if db exists
shell: "kanso listdb | grep {{xovis_db_name }}" shell: "kanso listdb | grep {{ xovis_db_name }}"
register: found_db register: found_db
ignore_errors: yes ignore_errors: yes

View file

@ -46,7 +46,7 @@ lan_ip: 172.18.96.1
lan_netmask: 255.255.224.0 lan_netmask: 255.255.224.0
# Read https://github.com/iiab/iiab/wiki/IIAB-Networking # Read https://github.com/iiab/iiab/wiki/IIAB-Networking
# Also readable offline @ http://box/info/IIAB-Networking.html # Also readable offline @ http://box/info/IIAB-Networking.html
# Gateway mode # Gateway mode
iiab_lan_enabled: True iiab_lan_enabled: True
@ -272,7 +272,7 @@ rachel_install: False
rachel_enabled: False rachel_enabled: False
rachel_content_found: False rachel_content_found: False
#rachel_url: /rachel #rachel_url: /rachel
rachel_doc_root: "{{ doc_root}}/modules" rachel_doc_root: "{{ doc_root }}/modules"
# Kiwix-serve # Kiwix-serve
kiwix_install: True kiwix_install: True