|
|
@ -2,11 +2,13 @@ |
|
|
|
|
|
|
|
|
|
|
|
- name: Set default install mode to none |
|
|
|
- name: Set default install mode to none |
|
|
|
set_fact: dokuwiki_install_mode="none" |
|
|
|
set_fact: dokuwiki_install_mode="none" |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Install dependencies |
|
|
|
- name: Install dependencies |
|
|
|
yum: |
|
|
|
yum: |
|
|
|
name: |
|
|
|
name: |
|
|
|
- acl |
|
|
|
- acl |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Create PHP user acount |
|
|
|
- name: Create PHP user acount |
|
|
|
user: |
|
|
|
user: |
|
|
@ -14,21 +16,25 @@ |
|
|
|
comment: "PHP FPM for dokuwiki {{ dokuwiki_id }}" |
|
|
|
comment: "PHP FPM for dokuwiki {{ dokuwiki_id }}" |
|
|
|
system: yes |
|
|
|
system: yes |
|
|
|
shell: /sbin/nologin |
|
|
|
shell: /sbin/nologin |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Check if dokuwiki is already installed |
|
|
|
- name: Check if dokuwiki is already installed |
|
|
|
stat: path={{ dokuwiki_root_dir }}/meta/ansible_version |
|
|
|
stat: path={{ dokuwiki_root_dir }}/meta/ansible_version |
|
|
|
register: dokuwiki_version_file |
|
|
|
register: dokuwiki_version_file |
|
|
|
changed_when: False |
|
|
|
changed_when: False |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Check dokuwiki version |
|
|
|
- name: Check dokuwiki version |
|
|
|
command: cat {{ dokuwiki_root_dir }}/meta/ansible_version |
|
|
|
command: cat {{ dokuwiki_root_dir }}/meta/ansible_version |
|
|
|
register: dokuwiki_current_version |
|
|
|
register: dokuwiki_current_version |
|
|
|
changed_when: False |
|
|
|
changed_when: False |
|
|
|
when: dokuwiki_version_file.stat.exists |
|
|
|
when: dokuwiki_version_file.stat.exists |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Set installation process to install |
|
|
|
- name: Set installation process to install |
|
|
|
set_fact: dokuwiki_install_mode='install' |
|
|
|
set_fact: dokuwiki_install_mode='install' |
|
|
|
when: not dokuwiki_version_file.stat.exists |
|
|
|
when: not dokuwiki_version_file.stat.exists |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Set installation process to upgrade |
|
|
|
- name: Set installation process to upgrade |
|
|
|
set_fact: dokuwiki_install_mode='upgrade' |
|
|
|
set_fact: dokuwiki_install_mode='upgrade' |
|
|
@ -36,10 +42,12 @@ |
|
|
|
- dokuwiki_version_file.stat.exists |
|
|
|
- dokuwiki_version_file.stat.exists |
|
|
|
- dokuwiki_current_version.stdout != dokuwiki_version |
|
|
|
- dokuwiki_current_version.stdout != dokuwiki_version |
|
|
|
- dokuwiki_manage_upgrade |
|
|
|
- dokuwiki_manage_upgrade |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Create archive dir |
|
|
|
- name: Create archive dir |
|
|
|
file: path={{ dokuwiki_root_dir }}/archives/{{ dokuwiki_current_version.stdout }} state=directory mode=700 |
|
|
|
file: path={{ dokuwiki_root_dir }}/archives/{{ dokuwiki_current_version.stdout }} state=directory mode=700 |
|
|
|
when: dokuwiki_install_mode == 'upgrade' |
|
|
|
when: dokuwiki_install_mode == 'upgrade' |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Prepare dokuwiki upgrade |
|
|
|
- name: Prepare dokuwiki upgrade |
|
|
|
synchronize: |
|
|
|
synchronize: |
|
|
@ -49,6 +57,7 @@ |
|
|
|
delete: True |
|
|
|
delete: True |
|
|
|
delegate_to: "{{ inventory_hostname }}" |
|
|
|
delegate_to: "{{ inventory_hostname }}" |
|
|
|
when: dokuwiki_install_mode == 'upgrade' |
|
|
|
when: dokuwiki_install_mode == 'upgrade' |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Create directory structure |
|
|
|
- name: Create directory structure |
|
|
|
file: path={{ item.dir }} state=directory owner={{ item.owner | default(omit) }} group={{ item.groupe | default(omit) }} mode={{ item.mode | default(omit) }} |
|
|
|
file: path={{ item.dir }} state=directory owner={{ item.owner | default(omit) }} group={{ item.groupe | default(omit) }} mode={{ item.mode | default(omit) }} |
|
|
@ -70,6 +79,7 @@ |
|
|
|
- dir: "{{ dokuwiki_root_dir }}/web/conf/tpl" |
|
|
|
- dir: "{{ dokuwiki_root_dir }}/web/conf/tpl" |
|
|
|
group: "{{ dokuwiki_php_user }}" |
|
|
|
group: "{{ dokuwiki_php_user }}" |
|
|
|
mode: 770 |
|
|
|
mode: 770 |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Download Dokuwiki |
|
|
|
- name: Download Dokuwiki |
|
|
|
get_url: |
|
|
|
get_url: |
|
|
@ -77,6 +87,7 @@ |
|
|
|
dest: "{{ dokuwiki_root_dir }}/tmp/" |
|
|
|
dest: "{{ dokuwiki_root_dir }}/tmp/" |
|
|
|
checksum: "sha1:{{ dokuwiki_archive_sha1 }}" |
|
|
|
checksum: "sha1:{{ dokuwiki_archive_sha1 }}" |
|
|
|
when: dokuwiki_install_mode != 'none' |
|
|
|
when: dokuwiki_install_mode != 'none' |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Extract dokuwiki archive |
|
|
|
- name: Extract dokuwiki archive |
|
|
|
unarchive: |
|
|
|
unarchive: |
|
|
@ -84,6 +95,7 @@ |
|
|
|
dest: "{{ dokuwiki_root_dir }}/tmp/" |
|
|
|
dest: "{{ dokuwiki_root_dir }}/tmp/" |
|
|
|
remote_src: yes |
|
|
|
remote_src: yes |
|
|
|
when: dokuwiki_install_mode != 'none' |
|
|
|
when: dokuwiki_install_mode != 'none' |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Move the content of dokuwiki to the correct top directory |
|
|
|
- name: Move the content of dokuwiki to the correct top directory |
|
|
|
synchronize: |
|
|
|
synchronize: |
|
|
@ -95,6 +107,7 @@ |
|
|
|
- '--exclude=data/' |
|
|
|
- '--exclude=data/' |
|
|
|
delegate_to: "{{ inventory_hostname }}" |
|
|
|
delegate_to: "{{ inventory_hostname }}" |
|
|
|
when: dokuwiki_install_mode != 'none' |
|
|
|
when: dokuwiki_install_mode != 'none' |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Populate the data dir |
|
|
|
- name: Populate the data dir |
|
|
|
synchronize: |
|
|
|
synchronize: |
|
|
@ -103,9 +116,10 @@ |
|
|
|
recursive: True |
|
|
|
recursive: True |
|
|
|
delegate_to: "{{ inventory_hostname }}" |
|
|
|
delegate_to: "{{ inventory_hostname }}" |
|
|
|
when: dokuwiki_install_mode != 'none' |
|
|
|
when: dokuwiki_install_mode != 'none' |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Check existing conf to restore |
|
|
|
- name: Check existing conf to restore |
|
|
|
stat: path={{ dokuwiki_root_dir }}/archives/{{ dokuwiki_current_version.stdout }}/web/{{ item }} |
|
|
|
stat: path={{ dokuwiki_root_dir }}/archives/{{ dokuwiki_current_version }}/web/{{ item }} |
|
|
|
with_items: |
|
|
|
with_items: |
|
|
|
- conf/local.php |
|
|
|
- conf/local.php |
|
|
|
- conf/acl.auth.php |
|
|
|
- conf/acl.auth.php |
|
|
@ -113,6 +127,7 @@ |
|
|
|
- conf/plugins.local.php |
|
|
|
- conf/plugins.local.php |
|
|
|
- conf/tpl/ |
|
|
|
- conf/tpl/ |
|
|
|
register: dokuwiki_conf_to_restore |
|
|
|
register: dokuwiki_conf_to_restore |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Restore Configuration |
|
|
|
- name: Restore Configuration |
|
|
|
synchronize: |
|
|
|
synchronize: |
|
|
@ -124,6 +139,7 @@ |
|
|
|
when: |
|
|
|
when: |
|
|
|
- dokuwiki_install_mode == 'upgrade' |
|
|
|
- dokuwiki_install_mode == 'upgrade' |
|
|
|
- item.stat.exists |
|
|
|
- item.stat.exists |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: List previously installed plugins |
|
|
|
- name: List previously installed plugins |
|
|
|
shell: find {{ dokuwiki_root_dir }}/archives/{{ dokuwiki_current_version.stdout }}/web/lib/plugins -maxdepth 1 -mindepth 1 -type d -exec basename "{}" \; |
|
|
|
shell: find {{ dokuwiki_root_dir }}/archives/{{ dokuwiki_current_version.stdout }}/web/lib/plugins -maxdepth 1 -mindepth 1 -type d -exec basename "{}" \; |
|
|
@ -131,6 +147,7 @@ |
|
|
|
when: |
|
|
|
when: |
|
|
|
- dokuwiki_install_mode == 'upgrade' |
|
|
|
- dokuwiki_install_mode == 'upgrade' |
|
|
|
- not dokuwiki_remove_unmanaged_plugins |
|
|
|
- not dokuwiki_remove_unmanaged_plugins |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Restore unmanaged previous plugins |
|
|
|
- name: Restore unmanaged previous plugins |
|
|
|
synchronize: |
|
|
|
synchronize: |
|
|
@ -142,6 +159,7 @@ |
|
|
|
when: |
|
|
|
when: |
|
|
|
- dokuwiki_install_mode == 'upgrade' |
|
|
|
- dokuwiki_install_mode == 'upgrade' |
|
|
|
- not dokuwiki_remove_unmanaged_plugins |
|
|
|
- not dokuwiki_remove_unmanaged_plugins |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: List previously installed templates |
|
|
|
- name: List previously installed templates |
|
|
|
shell: find {{ dokuwiki_root_dir }}/archives/{{ dokuwiki_current_version.stdout }}/web/lib/tpl -maxdepth 1 -mindepth 1 -type d -exec basename "{}" \; |
|
|
|
shell: find {{ dokuwiki_root_dir }}/archives/{{ dokuwiki_current_version.stdout }}/web/lib/tpl -maxdepth 1 -mindepth 1 -type d -exec basename "{}" \; |
|
|
@ -149,6 +167,7 @@ |
|
|
|
when: |
|
|
|
when: |
|
|
|
- dokuwiki_install_mode == 'upgrade' |
|
|
|
- dokuwiki_install_mode == 'upgrade' |
|
|
|
- not dokuwiki_remove_unmanaged_tpl |
|
|
|
- not dokuwiki_remove_unmanaged_tpl |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Restore unmanaged previous templates |
|
|
|
- name: Restore unmanaged previous templates |
|
|
|
synchronize: |
|
|
|
synchronize: |
|
|
@ -160,10 +179,12 @@ |
|
|
|
when: |
|
|
|
when: |
|
|
|
- dokuwiki_install_mode == 'upgrade' |
|
|
|
- dokuwiki_install_mode == 'upgrade' |
|
|
|
- not dokuwiki_remove_unmanaged_tpl |
|
|
|
- not dokuwiki_remove_unmanaged_tpl |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Write dokuwiki version |
|
|
|
- name: Write dokuwiki version |
|
|
|
copy: content={{ dokuwiki_version }} dest={{ dokuwiki_root_dir }}/meta/ansible_version |
|
|
|
copy: content={{ dokuwiki_version }} dest={{ dokuwiki_root_dir }}/meta/ansible_version |
|
|
|
when: dokuwiki_install_mode != 'none' |
|
|
|
when: dokuwiki_install_mode != 'none' |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Compress previous version |
|
|
|
- name: Compress previous version |
|
|
|
command: tar cJf {{ dokuwiki_root_dir }}/archives/{{ dokuwiki_current_version.stdout }}.txz ./ |
|
|
|
command: tar cJf {{ dokuwiki_root_dir }}/archives/{{ dokuwiki_current_version.stdout }}.txz ./ |
|
|
@ -172,18 +193,22 @@ |
|
|
|
args: |
|
|
|
args: |
|
|
|
chdir: "{{ dokuwiki_root_dir }}/archives/{{ dokuwiki_current_version.stdout }}" |
|
|
|
chdir: "{{ dokuwiki_root_dir }}/archives/{{ dokuwiki_current_version.stdout }}" |
|
|
|
when: dokuwiki_install_mode == 'upgrade' |
|
|
|
when: dokuwiki_install_mode == 'upgrade' |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Remove archive directory |
|
|
|
- name: Remove archive directory |
|
|
|
file: path={{ dokuwiki_root_dir }}/archives/{{ dokuwiki_current_version.stdout }} state=absent |
|
|
|
file: path={{ dokuwiki_root_dir }}/archives/{{ dokuwiki_current_version.stdout }} state=absent |
|
|
|
when: dokuwiki_install_mode == 'upgrade' |
|
|
|
when: dokuwiki_install_mode == 'upgrade' |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Build a list of installed plugins |
|
|
|
- name: Build a list of installed plugins |
|
|
|
shell: find {{ dokuwiki_root_dir }}/web/lib/plugins -maxdepth 1 -mindepth 1 -type d -exec basename "{}" \; |
|
|
|
shell: find {{ dokuwiki_root_dir }}/web/lib/plugins -maxdepth 1 -mindepth 1 -type d -exec basename "{}" \; |
|
|
|
register: dokuwiki_installed_plugins |
|
|
|
register: dokuwiki_installed_plugins |
|
|
|
changed_when: False |
|
|
|
changed_when: False |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Install authhttpldap plugin |
|
|
|
- name: Install authhttpldap plugin |
|
|
|
copy: src=authhttpldap dest={{ dokuwiki_root_dir }}/web/lib/plugins |
|
|
|
copy: src=authhttpldap dest={{ dokuwiki_root_dir }}/web/lib/plugins |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Download plugins |
|
|
|
- name: Download plugins |
|
|
|
get_url: |
|
|
|
get_url: |
|
|
@ -194,6 +219,7 @@ |
|
|
|
- dokuwiki_plugins[item] is defined |
|
|
|
- dokuwiki_plugins[item] is defined |
|
|
|
- dokuwiki_plugins[item].type | default('plugin') == 'plugin' |
|
|
|
- dokuwiki_plugins[item].type | default('plugin') == 'plugin' |
|
|
|
with_items: "{{ dokuwiki_plugins_to_install }}" |
|
|
|
with_items: "{{ dokuwiki_plugins_to_install }}" |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Extract plugins |
|
|
|
- name: Extract plugins |
|
|
|
unarchive: |
|
|
|
unarchive: |
|
|
@ -205,6 +231,7 @@ |
|
|
|
- dokuwiki_plugins[item] is defined |
|
|
|
- dokuwiki_plugins[item] is defined |
|
|
|
- dokuwiki_plugins[item].type | default('plugin') == 'plugin' |
|
|
|
- dokuwiki_plugins[item].type | default('plugin') == 'plugin' |
|
|
|
with_items: "{{ dokuwiki_plugins_to_install }}" |
|
|
|
with_items: "{{ dokuwiki_plugins_to_install }}" |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Move plugins to the final dir |
|
|
|
- name: Move plugins to the final dir |
|
|
|
synchronize: |
|
|
|
synchronize: |
|
|
@ -218,6 +245,7 @@ |
|
|
|
- dokuwiki_plugins[item] is defined |
|
|
|
- dokuwiki_plugins[item] is defined |
|
|
|
- dokuwiki_plugins[item].type | default('plugin') == 'plugin' |
|
|
|
- dokuwiki_plugins[item].type | default('plugin') == 'plugin' |
|
|
|
with_items: "{{ dokuwiki_plugins_to_install }}" |
|
|
|
with_items: "{{ dokuwiki_plugins_to_install }}" |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Remove unmanaged plugins |
|
|
|
- name: Remove unmanaged plugins |
|
|
|
file: path={{ dokuwiki_root_dir }}/web/lib/plugins/{{ item }} state=absent |
|
|
|
file: path={{ dokuwiki_root_dir }}/web/lib/plugins/{{ item }} state=absent |
|
|
@ -226,11 +254,13 @@ |
|
|
|
- item not in dokuwiki_plugins_to_install |
|
|
|
- item not in dokuwiki_plugins_to_install |
|
|
|
- item not in dokuwiki_core_plugins |
|
|
|
- item not in dokuwiki_core_plugins |
|
|
|
- dokuwiki_remove_unmanaged_plugins |
|
|
|
- dokuwiki_remove_unmanaged_plugins |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Build a list of installed templates |
|
|
|
- name: Build a list of installed templates |
|
|
|
shell: find {{ dokuwiki_root_dir }}/web/lib/tpl -maxdepth 1 -mindepth 1 -type d -exec basename "{}" \; |
|
|
|
shell: find {{ dokuwiki_root_dir }}/web/lib/tpl -maxdepth 1 -mindepth 1 -type d -exec basename "{}" \; |
|
|
|
register: dokuwiki_installed_tpl |
|
|
|
register: dokuwiki_installed_tpl |
|
|
|
changed_when: False |
|
|
|
changed_when: False |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Download templates |
|
|
|
- name: Download templates |
|
|
|
get_url: |
|
|
|
get_url: |
|
|
@ -241,6 +271,7 @@ |
|
|
|
- dokuwiki_plugins[item].type | default('plugin') == 'tpl' |
|
|
|
- dokuwiki_plugins[item].type | default('plugin') == 'tpl' |
|
|
|
- item not in dokuwiki_installed_tpl.stdout_lines | difference(['dokuwiki']) |
|
|
|
- item not in dokuwiki_installed_tpl.stdout_lines | difference(['dokuwiki']) |
|
|
|
with_items: "{{ dokuwiki_tpl_to_install }}" |
|
|
|
with_items: "{{ dokuwiki_tpl_to_install }}" |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Extract templates |
|
|
|
- name: Extract templates |
|
|
|
unarchive: |
|
|
|
unarchive: |
|
|
@ -252,6 +283,7 @@ |
|
|
|
- dokuwiki_plugins[item].type | default('plugin') == 'tpl' |
|
|
|
- dokuwiki_plugins[item].type | default('plugin') == 'tpl' |
|
|
|
- item not in dokuwiki_installed_tpl.stdout_lines | difference(['dokuwiki']) |
|
|
|
- item not in dokuwiki_installed_tpl.stdout_lines | difference(['dokuwiki']) |
|
|
|
with_items: "{{ dokuwiki_tpl_to_install }}" |
|
|
|
with_items: "{{ dokuwiki_tpl_to_install }}" |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Move templates to the final dir |
|
|
|
- name: Move templates to the final dir |
|
|
|
synchronize: |
|
|
|
synchronize: |
|
|
@ -265,6 +297,7 @@ |
|
|
|
- dokuwiki_plugins[item].type | default('plugin') == 'tpl' |
|
|
|
- dokuwiki_plugins[item].type | default('plugin') == 'tpl' |
|
|
|
- item not in dokuwiki_installed_tpl.stdout_lines | difference(['dokuwiki']) |
|
|
|
- item not in dokuwiki_installed_tpl.stdout_lines | difference(['dokuwiki']) |
|
|
|
with_items: "{{ dokuwiki_tpl_to_install }}" |
|
|
|
with_items: "{{ dokuwiki_tpl_to_install }}" |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Remove unmanaged tpl |
|
|
|
- name: Remove unmanaged tpl |
|
|
|
file: path={{ dokuwiki_root_dir }}/web/lib/tpl/{{ item }} state=absent |
|
|
|
file: path={{ dokuwiki_root_dir }}/web/lib/tpl/{{ item }} state=absent |
|
|
@ -273,61 +306,74 @@ |
|
|
|
- item not in dokuwiki_tpl_to_install |
|
|
|
- item not in dokuwiki_tpl_to_install |
|
|
|
- item != 'dokuwiki' |
|
|
|
- item != 'dokuwiki' |
|
|
|
- dokuwiki_remove_unmanaged_tpl |
|
|
|
- dokuwiki_remove_unmanaged_tpl |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Remove temp files |
|
|
|
- name: Remove temp files |
|
|
|
file: path={{ dokuwiki_root_dir }}/tmp/{{ item }} state=absent |
|
|
|
file: path={{ dokuwiki_root_dir }}/tmp/{{ item }} state=absent |
|
|
|
with_items: |
|
|
|
with_items: |
|
|
|
- dokuwiki-{{ dokuwiki_version }} |
|
|
|
- dokuwiki-{{ dokuwiki_version }} |
|
|
|
- dokuwiki-{{ dokuwiki_version }}.tgz |
|
|
|
- dokuwiki-{{ dokuwiki_version }}.tgz |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Remove plugins archives |
|
|
|
- name: Remove plugins archives |
|
|
|
file: path={{ dokuwiki_root_dir }}/tmp/{{ dokuwiki_plugins[item].archive_name }} state=absent |
|
|
|
file: path={{ dokuwiki_root_dir }}/tmp/{{ dokuwiki_plugins[item].archive_name }} state=absent |
|
|
|
when: dokuwiki_plugins[item] is defined |
|
|
|
when: dokuwiki_plugins[item] is defined |
|
|
|
with_items: "{{ dokuwiki_plugins_to_install + dokuwiki_tpl_to_install }}" |
|
|
|
with_items: "{{ dokuwiki_plugins_to_install + dokuwiki_tpl_to_install }}" |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Remove plugins temp files |
|
|
|
- name: Remove plugins temp files |
|
|
|
file: path={{ dokuwiki_root_dir }}/tmp/{{ dokuwiki_plugins[item].archive_dir | default(dokuwiki_plugins[item].archive_name | splitext | first) }} state=absent |
|
|
|
file: path={{ dokuwiki_root_dir }}/tmp/{{ dokuwiki_plugins[item].archive_dir | default(dokuwiki_plugins[item].archive_name | splitext | first) }} state=absent |
|
|
|
when: dokuwiki_plugins[item] is defined |
|
|
|
when: dokuwiki_plugins[item] is defined |
|
|
|
with_items: "{{ dokuwiki_plugins_to_install + dokuwiki_tpl_to_install }}" |
|
|
|
with_items: "{{ dokuwiki_plugins_to_install + dokuwiki_tpl_to_install }}" |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Deploy permission script |
|
|
|
- name: Deploy permission script |
|
|
|
template: src=perms.sh.j2 dest={{ dokuwiki_root_dir }}/perms.sh mode=755 |
|
|
|
template: src=perms.sh.j2 dest={{ dokuwiki_root_dir }}/perms.sh mode=755 |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Deploy httpd configuration |
|
|
|
- name: Deploy httpd configuration |
|
|
|
template: src=httpd.conf.j2 dest=/etc/httpd/ansible_conf.d/10-dokuwiki_{{ dokuwiki_id }}.conf |
|
|
|
template: src=httpd.conf.j2 dest=/etc/httpd/ansible_conf.d/10-dokuwiki_{{ dokuwiki_id }}.conf |
|
|
|
notify: reload httpd |
|
|
|
notify: reload httpd |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Deploy php configuration |
|
|
|
- name: Deploy php configuration |
|
|
|
template: src=php.conf.j2 dest={{ httpd_php_versions[dokuwiki_php_version].conf_path }}/php-fpm.d/dokuwiki_{{ dokuwiki_id }}.conf |
|
|
|
template: src=php.conf.j2 dest={{ httpd_php_versions[dokuwiki_php_version].conf_path }}/php-fpm.d/dokuwiki_{{ dokuwiki_id }}.conf |
|
|
|
notify: restart php-fpm |
|
|
|
notify: restart php-fpm |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Remove PHP config from other versions |
|
|
|
- name: Remove PHP config from other versions |
|
|
|
file: path={{ httpd_php_versions[item].conf_path }}/php-fpm.d/dokuwiki_{{ dokuwiki_id }}.conf state=absent |
|
|
|
file: path={{ httpd_php_versions[item].conf_path }}/php-fpm.d/dokuwiki_{{ dokuwiki_id }}.conf state=absent |
|
|
|
with_items: "{{ httpd_php_versions.keys() | list | difference([ dokuwiki_php_version ]) }}" |
|
|
|
with_items: "{{ httpd_php_versions.keys() | list | difference([ dokuwiki_php_version ]) }}" |
|
|
|
notify: restart php-fpm |
|
|
|
notify: restart php-fpm |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Remove PHP config (using a custom pool) |
|
|
|
- name: Remove PHP config (using a custom pool) |
|
|
|
file: path={{ httpd_php_versions[item].conf_path }}/php-fpm.d/dokuwiki_{{ dokuwiki_id }}.conf state=absent |
|
|
|
file: path={{ httpd_php_versions[item].conf_path }}/php-fpm.d/dokuwiki_{{ dokuwiki_id }}.conf state=absent |
|
|
|
with_items: "{{ httpd_php_versions.keys() | list }}" |
|
|
|
with_items: "{{ httpd_php_versions.keys() | list }}" |
|
|
|
when: dokuwiki_php_fpm_pool is defined |
|
|
|
when: dokuwiki_php_fpm_pool is defined |
|
|
|
notify: restart php-fpm |
|
|
|
notify: restart php-fpm |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Deploy dokuwiki configuration |
|
|
|
- name: Deploy dokuwiki configuration |
|
|
|
template: src={{ item }}.j2 dest={{ dokuwiki_root_dir }}/web/conf/{{ item }} owner=root group={{ dokuwiki_php_user }} mode=660 |
|
|
|
template: src={{ item }}.j2 dest={{ dokuwiki_root_dir }}/web/conf/{{ item }} owner=root group={{ dokuwiki_php_user }} mode=660 |
|
|
|
with_items: |
|
|
|
with_items: |
|
|
|
- local.protected.php |
|
|
|
- local.protected.php |
|
|
|
- plugins.protected.php |
|
|
|
- plugins.protected.php |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Check if local.php exists |
|
|
|
- name: Check if local.php exists |
|
|
|
stat: path={{ dokuwiki_root_dir }}/web/conf/local.php |
|
|
|
stat: path={{ dokuwiki_root_dir }}/web/conf/local.php |
|
|
|
register: dokuwiki_local_php |
|
|
|
register: dokuwiki_local_php |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Set default values |
|
|
|
- name: Set default values |
|
|
|
template: src=local.php.j2 dest={{ dokuwiki_root_dir }}/web/conf/local.php |
|
|
|
template: src=local.php.j2 dest={{ dokuwiki_root_dir }}/web/conf/local.php |
|
|
|
when: not dokuwiki_local_php.stat.exists |
|
|
|
when: not dokuwiki_local_php.stat.exists |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Deploy htaccess |
|
|
|
- name: Deploy htaccess |
|
|
|
template: src=htaccess.j2 dest={{ dokuwiki_root_dir }}/web/.htaccess |
|
|
|
template: src=htaccess.j2 dest={{ dokuwiki_root_dir }}/web/.htaccess |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Set correct SElinux context |
|
|
|
- name: Set correct SElinux context |
|
|
|
sefcontext: |
|
|
|
sefcontext: |
|
|
@ -335,10 +381,12 @@ |
|
|
|
setype: httpd_sys_content_t |
|
|
|
setype: httpd_sys_content_t |
|
|
|
state: present |
|
|
|
state: present |
|
|
|
when: ansible_selinux.status == 'enabled' |
|
|
|
when: ansible_selinux.status == 'enabled' |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- name: Set optimal permissions |
|
|
|
- name: Set optimal permissions |
|
|
|
command: "{{ dokuwiki_root_dir }}/perms.sh" |
|
|
|
command: "{{ dokuwiki_root_dir }}/perms.sh" |
|
|
|
changed_when: False |
|
|
|
changed_when: False |
|
|
|
|
|
|
|
tags: dokuwiki |
|
|
|
|
|
|
|
|
|
|
|
- include: filebeat.yml |
|
|
|
- include: filebeat.yml |
|
|
|
... |
|
|
|
... |
|
|
|