mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 19:52:06 +00:00
Merge pull request #1264 from holta/elgg-warnings
Clarify roles/elgg/tasks/main.yml
This commit is contained in:
commit
844847f5b1
1 changed files with 18 additions and 18 deletions
|
@ -1,7 +1,7 @@
|
||||||
# Assume we only get here if elgg_install: True
|
# Assume we only get here if elgg_install: True
|
||||||
# Assume MySQL is running
|
# Assume MySQL is running
|
||||||
|
|
||||||
- name: Download current version from our site
|
- 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 }}
|
#shell: wget {{ iiab_download_url }}/elgg-{{ elgg_version }}.zip -c -P {{ downloads_dir }}
|
||||||
#args:
|
#args:
|
||||||
# creates: "{{ downloads_dir }}/elgg-{{ elgg_version }}.zip"
|
# creates: "{{ downloads_dir }}/elgg-{{ elgg_version }}.zip"
|
||||||
|
@ -11,12 +11,12 @@
|
||||||
timeout: "{{ download_timeout }}"
|
timeout: "{{ download_timeout }}"
|
||||||
when: internet_available
|
when: internet_available
|
||||||
|
|
||||||
- name: Determine if software is already expanded
|
- name: Check for existence of /opt/elgg-{{ elgg_version }}/index.php
|
||||||
stat:
|
stat:
|
||||||
path: "/opt/elgg-{{ elgg_version }}/index.php"
|
path: "/opt/elgg-{{ elgg_version }}/index.php"
|
||||||
register: elgg
|
register: elgg
|
||||||
|
|
||||||
- name: Expand it to our location unless already done
|
- 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"
|
#shell: "/usr/bin/unzip -o {{ downloads_dir }}/elgg-{{ elgg_version }}.zip -d /opt"
|
||||||
unarchive:
|
unarchive:
|
||||||
#remote_src: yes
|
#remote_src: yes
|
||||||
|
@ -27,10 +27,10 @@
|
||||||
group: "{{ apache_user }}"
|
group: "{{ apache_user }}"
|
||||||
when: elgg.stat.exists is defined and not elgg.stat.exists
|
when: elgg.stat.exists is defined and not elgg.stat.exists
|
||||||
|
|
||||||
- name: Create a link to the versioned elgg-* folder
|
- name: Create softlink from /opt/elgg to /opt/elgg-{{ elgg_version }}
|
||||||
file:
|
file:
|
||||||
src: "./elgg-{{ elgg_version }}"
|
src: "./elgg-{{ elgg_version }}"
|
||||||
dest: /opt/elgg
|
path: /opt/elgg
|
||||||
owner: "{{ apache_user }}"
|
owner: "{{ apache_user }}"
|
||||||
group: "{{ apache_user }}"
|
group: "{{ apache_user }}"
|
||||||
state: link
|
state: link
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
group: "{{ apache_user }}"
|
group: "{{ apache_user }}"
|
||||||
|
|
||||||
# The name of this file changed from 1.9 to 1.10.
|
# The name of this file changed from 1.9 to 1.10.
|
||||||
- name: Copy default .htaccess to the root directory of Elgg tree
|
- name: Copy default .htaccess into /opt/{{ elgg_xx }}, root of Elgg tree
|
||||||
copy:
|
copy:
|
||||||
src: "/opt/{{ elgg_xx }}/vendor/elgg/elgg/install/config/htaccess.dist"
|
src: "/opt/{{ elgg_xx }}/vendor/elgg/elgg/install/config/htaccess.dist"
|
||||||
dest: "/opt/{{ elgg_xx }}/.htaccess"
|
dest: "/opt/{{ elgg_xx }}/.htaccess"
|
||||||
|
@ -53,28 +53,22 @@
|
||||||
group: "{{ apache_user }}"
|
group: "{{ apache_user }}"
|
||||||
|
|
||||||
#regexp='^#RewriteBase'
|
#regexp='^#RewriteBase'
|
||||||
- name: Modify .htaccess to have RewriteBase as our directory
|
- name: Change .htaccess to include RewriteBase for http://box/elgg
|
||||||
lineinfile:
|
lineinfile:
|
||||||
backup: no
|
backup: no
|
||||||
dest: "/opt/{{ elgg_xx }}/.htaccess"
|
path: "/opt/{{ elgg_xx }}/.htaccess"
|
||||||
state: present
|
state: present
|
||||||
insertafter: '^#RewriteBase'
|
insertafter: '^#RewriteBase'
|
||||||
line: "RewriteBase {{ elgg_url }}/"
|
line: "RewriteBase {{ elgg_url }}/"
|
||||||
|
|
||||||
- name: Change permissions on engine directory so Apache can write
|
- name: Set /opt/elgg/engine directory permissions to 0755 so Apache can write there
|
||||||
file:
|
file:
|
||||||
path: /opt/elgg/engine/
|
path: /opt/elgg/engine/
|
||||||
owner: "{{ apache_user }}"
|
owner: "{{ apache_user }}"
|
||||||
mode: 0755
|
mode: 0755
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: Create an upload directory that Apache can write in or Elgg
|
- name: Change /opt/elgg-{{ elgg_version }} ownership to {{ apache_user }}:{{ apache_user }} (likely not nec, as unarchive & all do this above)
|
||||||
file:
|
|
||||||
path: "{{ elgg_upload_path }}"
|
|
||||||
state: directory
|
|
||||||
owner: "{{ apache_user }}"
|
|
||||||
|
|
||||||
- name: Change ownership (likely not nec, unarchive & all do this above)
|
|
||||||
file:
|
file:
|
||||||
path: "/opt/elgg-{{ elgg_version }}"
|
path: "/opt/elgg-{{ elgg_version }}"
|
||||||
owner: "{{ apache_user }}"
|
owner: "{{ apache_user }}"
|
||||||
|
@ -82,7 +76,13 @@
|
||||||
recurse: yes
|
recurse: yes
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: Create a MySQL database for Elgg - can be run more than once
|
- 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:
|
mysql_db:
|
||||||
name: "{{ dbname }}"
|
name: "{{ dbname }}"
|
||||||
register: create_elgg_database
|
register: create_elgg_database
|
||||||
|
@ -107,7 +107,7 @@
|
||||||
# tar up a mysqldump of freshly installed database and use it in the install to avoid the startup
|
# 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)
|
# form, which worries me a lot. (/var/lib/mysql/elggdb)
|
||||||
|
|
||||||
- name: Load Elgg database from /tmp/elggdb.sql
|
- name: Populate Elgg's MySQL database {{ dbname }}, from /tmp/elggdb.sql
|
||||||
mysql_db:
|
mysql_db:
|
||||||
name: "{{ dbname }}"
|
name: "{{ dbname }}"
|
||||||
state: import
|
state: import
|
||||||
|
|
Loading…
Reference in a new issue