joomla: Manage the installation of multiple instances on the same host.

This commit is contained in:
Andrea Dell'Amico 2018-12-21 17:17:37 +01:00
parent 50170afd75
commit 79e5a81c2a
2 changed files with 25 additions and 4 deletions

View File

@ -1,8 +1,8 @@
---
joomla_dist_name: Joomla
joomla_major: 3
joomla_minor: 8
joomla_fix: 5
joomla_minor: 9
joomla_fix: 1
joomla_dist_version: '{{ joomla_major }}.{{ joomla_minor }}.{{ joomla_fix }}'
joomla_dist_file: '{{ joomla_dist_name }}_{{ joomla_dist_version }}-Stable-Full_Package.zip'
joomla_download_version: '{{ joomla_major }}-{{ joomla_minor }}-{{ joomla_fix }}'

View File

@ -33,13 +33,34 @@
args:
creates: '{{ joomla_install_dir }}/index.php'
with_items: '{{ phpfpm_pools }}'
when: joomla_download is changed
when:
- joomla_download is changed
- item.joomla_install_dir is not defined
register: unpack_joomla
- name: Set the correct ownership of the joomla files
file: dest={{ joomla_install_dir }} owner={{ item.user }} group={{ item.group }} recurse=yes state=directory
with_items: '{{ phpfpm_pools }}'
when: unpack_joomla is changed
when:
- unpack_joomla is changed
- item.joomla_install_dir is not defined
- name: Move the joomla files to the right place, multiple instances
shell: cp -a {{ joomla_download_dir }}/joomla-unpacked/* {{ item.joomla_install_dir }}/
args:
creates: '{{ item.joomla_install_dir }}/index.php'
with_items: '{{ phpfpm_pools }}'
when:
- joomla_download is changed
- item.joomla_install_dir is defined
register: unpack_joomla
- name: Set the correct ownership of the joomla files
file: dest={{ item.joomla_install_dir }} owner={{ item.user }} group={{ item.group }} recurse=yes state=directory
with_items: '{{ phpfpm_pools }}'
when:
- unpack_joomla is changed
- item.joomla_install_dir is defined
- name: Remove the original joomla unpacked distribution
command: rm -fr {{ joomla_download_dir }}/{{ joomla_dist_name }}