1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

dokuwiki - iiab_installed

This commit is contained in:
Jerry Vonau 2019-09-14 17:38:55 -05:00
parent 8c8e44ce03
commit 3a251be789
3 changed files with 45 additions and 20 deletions

View file

@ -0,0 +1,35 @@
- 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: Restart Apache ({{ apache_service }}) to enable/disable DokuWiki's http://box/wiki
systemd:
name: "{{ apache_service }}"
daemon_reload: yes
state: restarted
- name: Add 'dokuwiki' variable values to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}"
section: dokuwiki
option: "{{ item.option }}"
value: "{{ item.value }}"
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 }}"

View file

@ -48,7 +48,9 @@
state: directory
recurse: yes
- name: Restart Apache ({{ apache_service }}) to enable/disable DokuWiki's http://box/wiki
systemd:
name: "{{ apache_service }}"
state: restarted
- name: Add 'dokuwiki_installed' variable values to {{ iiab_installed }}
lineinfile:
dest: "{{ iiab_installed }}"
regexp: '^dokuwiki_installed'
line: 'dokuwiki_installed'
state: present

View file

@ -1,19 +1,7 @@
- name: Install DokuWiki
include_tasks: install.yml
when: dokuwiki_install | bool
when: dokuwiki_install | bool and not dokuwiki_installed is defined
- name: Add 'dokuwiki' variable values to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}"
section: dokuwiki
option: "{{ item.option }}"
value: "{{ item.value }}"
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 }}"
- name: Enable DokuWiki
include_tasks: enable.yml
when: dokuwiki_install | bool or dokuwiki_installed is defined