mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 19:52:06 +00:00
* expand zim_versions_idx to include menuItem name, mediaCount, articleCount, size * create a stub menuItem if none exists * remember to change consumer of zim_version_idx in iiab-admin * comment out some debugging prints * do not change the name of a variable in iiab.ini * consistent variable names for *_enabled * start work on menus for enabled iiab roles * changes to display cups in home menu * remove reference to admin console which may not be installed * print error message * dict.get errors * handle undefined menuItem" * handle undefined menuItem again * some work on logos * break out the zim_versions_idx routines for use by update_menus in admin-console * remove old menuDef creation code * new variable names for zim_versions_idx * missing the tags data in zim_versions_idx * un-break-apart iiab-make-kiwix-lib.py * return an empty string * make size human_readable * getting console and iiab to work together on menus * add the new zim_date field to zim_versions_idx * get the latest into repo * found lost code iiab-make-kiwix-lib.py * Create Lokole admin user during setup * Add requested content to lokole readme Per iiab/iiab#1293 * Update default password * Add Lokole-IIAB user manual * Update default_vars.yml * Update local_vars_min.yml * Update local_vars_min.yml * Update local_vars_medium.yml * Update local_vars_min.yml * Update default_vars.yml * Update local_vars_big.yml * Update local_vars_medium.yml * Update default_vars.yml * Update default_vars.yml * Update local_vars_min.yml * Update local_vars_medium.yml * Update local_vars_big.yml * Update default_vars.yml * Update default_vars.yml * Update local_vars_big.yml * Update local_vars_medium.yml * Update local_vars_min.yml * Update default_vars.yml * Update local_vars_big.yml * Update local_vars_medium.yml * Update local_vars_min.yml * Change admin username to uppercase * Revert "Lokole: change admin to Admin per IIAB app norms" * Update main.yml * Update README.rst * Update capture-wsgi.py * Update main.yml * Update main.yml * Update default_vars.yml * Update local_vars_big.yml * Update local_vars_medium.yml * Update local_vars_min.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update default_vars.yml * Update local_vars_big.yml * Update local_vars_medium.yml * Update local_vars_min.yml * Address TODOs in Lokole documentation See https://github.com/ascoderu/opwen-webapp/issues/81 * Update main.yml * Update local_vars_big.yml * Update local_vars_medium.yml * Update local_vars_big.yml * Update local_vars_min.yml * Update default_vars.yml * expand zim_versions_idx to include menuItem name, mediaCount, articleCount, size * create a stub menuItem if none exists * remember to change consumer of zim_version_idx in iiab-admin * comment out some debugging prints * do not change the name of a variable in iiab.ini * consistent variable names for *_enabled * start work on menus for enabled iiab roles * changes to display cups in home menu * remove reference to admin console which may not be installed * print error message * dict.get errors * handle undefined menuItem" * handle undefined menuItem again * some work on logos * break out the zim_versions_idx routines for use by update_menus in admin-console * remove old menuDef creation code * new variable names for zim_versions_idx * missing the tags data in zim_versions_idx * un-break-apart iiab-make-kiwix-lib.py * return an empty string * make size human_readable * getting console and iiab to work together on menus * add the new zim_date field to zim_versions_idx * get the latest into repo * found lost code iiab-make-kiwix-lib.py
165 lines
5.3 KiB
YAML
165 lines
5.3 KiB
YAML
# Assume we only get here if elgg_install: True
|
|
# Assume MySQL is running
|
|
|
|
- name: Download {{ iiab_download_url }}/elgg-{{ elgg_version }}.zip to {{ downloads_dir }}
|
|
#shell: wget {{ iiab_download_url }}/elgg-{{ elgg_version }}.zip -c -P {{ downloads_dir }}
|
|
#args:
|
|
# creates: "{{ downloads_dir }}/elgg-{{ elgg_version }}.zip"
|
|
get_url:
|
|
url: "{{ iiab_download_url }}/elgg-{{ elgg_version }}.zip"
|
|
dest: "{{ downloads_dir }}"
|
|
timeout: "{{ download_timeout }}"
|
|
when: internet_available
|
|
|
|
- name: Check for existence of /opt/elgg-{{ elgg_version }}/index.php
|
|
stat:
|
|
path: "/opt/elgg-{{ elgg_version }}/index.php"
|
|
register: elgg
|
|
|
|
- name: Unpack (unarchive) .zip to /opt, if above index.php doesn't exist
|
|
#shell: "/usr/bin/unzip -o {{ downloads_dir }}/elgg-{{ elgg_version }}.zip -d /opt"
|
|
unarchive:
|
|
#remote_src: yes
|
|
#src: "{{ iiab_download_url }}/elgg-{{ elgg_version }}.zip"
|
|
src: "{{ downloads_dir }}/elgg-{{ elgg_version }}.zip"
|
|
dest: /opt
|
|
owner: "{{ apache_user }}"
|
|
group: "{{ apache_user }}"
|
|
when: elgg.stat.exists is defined and not elgg.stat.exists
|
|
|
|
- name: Create softlink from /opt/elgg to /opt/elgg-{{ elgg_version }}
|
|
file:
|
|
src: "./elgg-{{ elgg_version }}"
|
|
path: /opt/elgg
|
|
owner: "{{ apache_user }}"
|
|
group: "{{ apache_user }}"
|
|
state: link
|
|
force: true
|
|
|
|
- name: 'Install /opt/elgg/elgg-config/settings.php from template (WARNING: overwrites manual settings!)'
|
|
template:
|
|
src: "settings.php.j2"
|
|
dest: "/opt/{{ elgg_xx }}/elgg-config/settings.php"
|
|
owner: "{{ apache_user }}"
|
|
group: "{{ apache_user }}"
|
|
|
|
# The name of this file changed from 1.9 to 1.10.
|
|
- name: Copy default .htaccess into /opt/{{ elgg_xx }}, root of Elgg tree
|
|
copy:
|
|
src: "/opt/{{ elgg_xx }}/vendor/elgg/elgg/install/config/htaccess.dist"
|
|
dest: "/opt/{{ elgg_xx }}/.htaccess"
|
|
mode: 0644
|
|
owner: "{{ apache_user }}"
|
|
group: "{{ apache_user }}"
|
|
|
|
#regexp='^#RewriteBase'
|
|
- name: Change .htaccess to include RewriteBase for http://box/elgg
|
|
lineinfile:
|
|
backup: no
|
|
path: "/opt/{{ elgg_xx }}/.htaccess"
|
|
state: present
|
|
insertafter: '^#RewriteBase'
|
|
line: "RewriteBase {{ elgg_url }}/"
|
|
|
|
- name: Set /opt/elgg/engine directory permissions to 0755 so Apache can write there
|
|
file:
|
|
path: /opt/elgg/engine/
|
|
owner: "{{ apache_user }}"
|
|
mode: 0755
|
|
state: directory
|
|
|
|
- name: Change /opt/elgg-{{ elgg_version }} ownership to {{ apache_user }}:{{ apache_user }} (likely not nec, as unarchive & all do this above)
|
|
file:
|
|
path: "/opt/elgg-{{ elgg_version }}"
|
|
owner: "{{ apache_user }}"
|
|
group: "{{ apache_user }}"
|
|
recurse: yes
|
|
state: directory
|
|
|
|
- name: Create upload directory {{ elgg_upload_path }} that Apache (and Elgg) can write to
|
|
file:
|
|
path: "{{ elgg_upload_path }}"
|
|
state: directory
|
|
owner: "{{ apache_user }}"
|
|
|
|
- name: Create Elgg's MySQL database {{ dbname }}, to be populated below - can be run more than once
|
|
mysql_db:
|
|
name: "{{ dbname }}"
|
|
register: create_elgg_database
|
|
|
|
- name: Create user/password to access Elgg database - can be run more than once
|
|
mysql_user:
|
|
name: "{{ dbuser }}"
|
|
host: "{{ item }}"
|
|
password: "{{ dbpassword }}"
|
|
priv: "{{ dbname }}.*:ALL"
|
|
with_items:
|
|
- 127.0.0.1
|
|
- ::1
|
|
- localhost
|
|
|
|
- name: Create /tmp/elggdb.sql from template, to load database
|
|
template:
|
|
src: "elggdb.sql.j2"
|
|
dest: "/tmp/elggdb.sql"
|
|
|
|
# elggdb.sql obtained with mysqldump --skip-add-drop-table elggdb > elggdb.sql
|
|
# tar up a mysqldump of freshly installed database and use it in the install to avoid the startup
|
|
# form, which worries me a lot. (/var/lib/mysql/elggdb)
|
|
|
|
- name: Populate Elgg's MySQL database {{ dbname }}, from /tmp/elggdb.sql
|
|
mysql_db:
|
|
name: "{{ dbname }}"
|
|
state: import
|
|
target: /tmp/elggdb.sql
|
|
when: create_elgg_database.changed
|
|
|
|
- name: Remove database dump /tmp/elggdb.sql
|
|
file:
|
|
name: /tmp/elggdb.sql
|
|
state: absent
|
|
|
|
- name: Install /etc/{{ apache_config_dir }}/elgg.conf from template, for http://box/elgg
|
|
template:
|
|
src: elgg.conf
|
|
dest: "/etc/{{ apache_config_dir }}/elgg.conf"
|
|
|
|
- name: Create symlink elgg.conf from sites-enabled to sites-available (debuntu, not nec for redhat)
|
|
file:
|
|
src: /etc/apache2/sites-available/elgg.conf
|
|
path: /etc/apache2/sites-enabled/elgg.conf
|
|
state: link
|
|
when: elgg_enabled and is_debuntu
|
|
|
|
- name: Remove symlink /etc/apache2/sites-enabled/elgg.conf (debuntu)
|
|
file:
|
|
path: /etc/apache2/sites-enabled/elgg.conf
|
|
state: absent
|
|
when: not elgg_enabled and is_debuntu
|
|
|
|
- name: Remove Apache's elgg.conf (redhat)
|
|
file:
|
|
dest: "/etc/{{ apache_config_dir }}/elgg.conf"
|
|
state: absent
|
|
when: not elgg_enabled and is_redhat
|
|
|
|
- name: Restart Apache ({{ apache_service }}) to enable/disable http://box/elgg
|
|
service:
|
|
name: "{{ apache_service }}"
|
|
state: restarted
|
|
|
|
- name: Add 'elgg' variable values to {{ iiab_ini_file }}
|
|
ini_file:
|
|
path: "{{ iiab_ini_file }}"
|
|
section: elgg
|
|
option: "{{ item.option }}"
|
|
value: "{{ item.value }}"
|
|
with_items:
|
|
- option: name
|
|
value: Elgg
|
|
- option: description
|
|
value: '"Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications."'
|
|
- option: path
|
|
value: /opt/elgg
|
|
- option: elgg_enabled
|
|
value: "{{ elgg_enabled }}"
|