mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +00:00
commit
cd7b9fcf4e
23 changed files with 51 additions and 54 deletions
2
iiab.yml
2
iiab.yml
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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 }}
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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 }}
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -4,5 +4,4 @@
|
||||||
## 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 }}'
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
@ -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 %}
|
||||||
|
|
||||||
|
|
|
@ -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 %}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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:
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue