mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Move 19 roles into roles/0-DEPRECATED-ROLES
This commit is contained in:
parent
0e39c42bbd
commit
2218d2334b
124 changed files with 5 additions and 1 deletions
36
roles/0-DEPRECATED-ROLES/dokuwiki/README.rst
Normal file
36
roles/0-DEPRECATED-ROLES/dokuwiki/README.rst
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
===============
|
||||
DokuWiki README
|
||||
===============
|
||||
|
||||
DokuWiki is a simple to use and highly versatile Open Source wiki software that
|
||||
doesn't require a database. It is loved by users for its clean and readable
|
||||
syntax. The ease of maintenance, backup and integration makes it an
|
||||
administrator's favorite. Built in access controls and authentication connectors
|
||||
make DokuWiki especially useful in the enterprise context and the large number of
|
||||
plugins contributed by its vibrant community allow for a broad range of use cases
|
||||
beyond a traditional wiki.
|
||||
|
||||
http://dokuwiki.org
|
||||
|
||||
After Installation
|
||||
------------------
|
||||
|
||||
Head to http://box.lan/wiki. The webpage will probably throw up an error
|
||||
saying you haven't run install.php yet, with a link to it. Click the link to be
|
||||
taken to the install page which does the initial configuration of the wiki. After
|
||||
this, you should be all set!
|
||||
|
||||
Locations
|
||||
---------
|
||||
|
||||
Everything is copied to the /opt/dokuwiki folder. An apache configuration file is
|
||||
installed in the usual conf.d directory.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
None yet other than the basic enabled/disabled. Haven't really tested if they work.
|
||||
|
||||
Todo
|
||||
----
|
||||
* Preinstall some popular plugins.
|
||||
* Additional IIAB customizations.
|
||||
9
roles/0-DEPRECATED-ROLES/dokuwiki/defaults/main.yml
Normal file
9
roles/0-DEPRECATED-ROLES/dokuwiki/defaults/main.yml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# dokuwiki_install: False
|
||||
# dokuwiki_enabled: False
|
||||
|
||||
# dokuwiki_url: /dokuwiki
|
||||
|
||||
# All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml
|
||||
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!
|
||||
|
||||
dokuwiki_version: "dokuwiki-2018-04-22b"
|
||||
52
roles/0-DEPRECATED-ROLES/dokuwiki/tasks/enable.yml
Normal file
52
roles/0-DEPRECATED-ROLES/dokuwiki/tasks/enable.yml
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
# Apache
|
||||
|
||||
- name: Enable http://box{{ dokuwiki_url }} via Apache # http://box/dokuwiki
|
||||
command: a2ensite dokuwiki.conf
|
||||
when: apache_install and dokuwiki_enabled
|
||||
|
||||
- name: Disable http://box{{ dokuwiki_url }} via Apache # http://box/dokuwiki
|
||||
command: a2dissite dokuwiki.conf
|
||||
when: apache_install and not dokuwiki_enabled
|
||||
|
||||
- name: Restart Apache systemd service ({{ apache_service }})
|
||||
systemd:
|
||||
name: "{{ apache_service }}"
|
||||
state: restarted
|
||||
when: apache_enabled | bool
|
||||
|
||||
# NGINX
|
||||
|
||||
- name: "SHIM: Enable http://box{{ dokuwiki_url }} via NGINX, by installing {{ nginx_conf_dir }}/dokuwiki-nginx.conf from template" # http://box/dokuwiki
|
||||
template:
|
||||
src: dokuwiki-nginx.conf.j2
|
||||
dest: "{{ nginx_conf_dir }}/dokuwiki-nginx.conf"
|
||||
when: nginx_install and dokuwiki_enabled
|
||||
|
||||
- name: "SHIM: Disable http://box{{ dokuwiki_url }} via NGINX, by removing {{ nginx_conf_dir }}/dokuwiki-nginx.conf" # http://box/dokuwiki
|
||||
file:
|
||||
path: "{{ nginx_conf_dir }}/dokuwiki-nginx.conf"
|
||||
state: absent
|
||||
when: nginx_install and not dokuwiki_enabled
|
||||
|
||||
- name: Restart 'nginx' systemd service
|
||||
systemd:
|
||||
name: nginx
|
||||
state: restarted
|
||||
when: nginx_enabled | bool
|
||||
|
||||
|
||||
- name: Add 'dokuwiki' variable values to {{ iiab_ini_file }}
|
||||
ini_file:
|
||||
path: "{{ iiab_ini_file }}"
|
||||
section: dokuwiki
|
||||
option: "{{ item.option }}"
|
||||
value: "{{ item.value | string }}"
|
||||
with_items:
|
||||
- option: name
|
||||
value: DokuWiki
|
||||
- option: description
|
||||
value: '"DokuWiki is a simple to use and highly versatile Open Source wiki software that does not require a database."'
|
||||
- option: installed
|
||||
value: "{{ dokuwiki_install }}"
|
||||
- option: enabled
|
||||
value: "{{ dokuwiki_enabled }}"
|
||||
54
roles/0-DEPRECATED-ROLES/dokuwiki/tasks/install.yml
Normal file
54
roles/0-DEPRECATED-ROLES/dokuwiki/tasks/install.yml
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
- name: Download {{ iiab_download_url }}/{{ dokuwiki_version }}.tgz # iiab_download_url is http://download.iiab.io/packages
|
||||
get_url:
|
||||
url: "{{ iiab_download_url }}/{{ dokuwiki_version }}.tgz"
|
||||
dest: "{{ downloads_dir }}/"
|
||||
timeout: "{{ download_timeout }}"
|
||||
when: internet_available | bool
|
||||
|
||||
- name: Unarchive (unpack) it to /library/{{ dokuwiki_version }}
|
||||
unarchive:
|
||||
src: "{{ downloads_dir }}/{{ dokuwiki_version }}.tgz"
|
||||
dest: /library
|
||||
creates: "/library/{{ dokuwiki_version }}/VERSION"
|
||||
|
||||
- name: Ensure dir /library/{{ dokuwiki_version }} is owned by {{ apache_user }} with 644/755 permissions
|
||||
file:
|
||||
path: "/library/{{ dokuwiki_version }}"
|
||||
owner: "{{ apache_user }}"
|
||||
mode: u+rw,go+r,go-w # '0755' had forced 'x' bits for non-dirs
|
||||
state: directory
|
||||
recurse: yes
|
||||
|
||||
- name: Symlink /library/dokuwiki -> /library/{{ dokuwiki_version }}
|
||||
#shell: if [ ! -d /library/dokuwiki ]; then ln -sf /library/{{ dokuwiki_version }} /library/dokuwiki; fi
|
||||
#shell: ln -sf /library/{{ dokuwiki_version }} /library/dokuwiki
|
||||
#BOTH LINES ABOVE FAIL TO UPDATE LINK; Ansible approach below works
|
||||
file:
|
||||
src: /library/{{ dokuwiki_version }}
|
||||
path: /library/dokuwiki
|
||||
state: link
|
||||
force: yes
|
||||
|
||||
- name: Install /etc/{{ apache_config_dir }}/dokuwiki.conf from template, for DokuWiki's http://box{{ dokuwiki_url }}
|
||||
template:
|
||||
src: dokuwiki.conf.j2
|
||||
dest: "/etc/{{ apache_config_dir }}/dokuwiki.conf"
|
||||
|
||||
# - name: Symlink /etc/apache2/sites-enabled/dokuwiki.conf to /etc/apache2/sites-available/dokuwiki.conf if dokuwiki_enabled (debuntu)
|
||||
# file:
|
||||
# src: /etc/apache2/sites-available/dokuwiki.conf
|
||||
# path: /etc/apache2/sites-enabled/dokuwiki.conf
|
||||
# state: link
|
||||
# when: dokuwiki_enabled and is_debuntu
|
||||
#
|
||||
# - name: Remove symlink /etc/apache2/sites-enabled/dokuwiki.conf if not dokuwiki_enabled (debuntu)
|
||||
# file:
|
||||
# path: /etc/apache2/sites-enabled/dokuwiki.conf
|
||||
# state: absent
|
||||
# when: not dokuwiki_enabled and is_debuntu
|
||||
|
||||
- name: "Add 'dokuwiki_installed: True' to {{ iiab_state_file }}"
|
||||
lineinfile:
|
||||
dest: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml
|
||||
regexp: '^dokuwiki_installed'
|
||||
line: 'dokuwiki_installed: True'
|
||||
7
roles/0-DEPRECATED-ROLES/dokuwiki/tasks/main.yml
Normal file
7
roles/0-DEPRECATED-ROLES/dokuwiki/tasks/main.yml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
- name: Install DokuWiki
|
||||
include_tasks: install.yml
|
||||
when: dokuwiki_install and not dokuwiki_installed is defined
|
||||
|
||||
- name: Enable DokuWiki
|
||||
include_tasks: enable.yml
|
||||
when: dokuwiki_install or dokuwiki_installed is defined
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
location {{ dokuwiki_url }}/ {
|
||||
proxy_pass http://127.0.0.1:{{ apache_port }}{{ dokuwiki_url }}/;
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
RewriteEngine on
|
||||
|
||||
Alias {{ dokuwiki_url }} /library/dokuwiki
|
||||
<Directory /library/dokuwiki>
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
Loading…
Add table
Add a link
Reference in a new issue