forked from ISTI-ansible-roles/ansible-roles
Fix the joomla dependencies and version.
This commit is contained in:
parent
6f5d8b47df
commit
6db1825c4a
|
@ -2,7 +2,7 @@
|
||||||
joomla_dist_name: Joomla
|
joomla_dist_name: Joomla
|
||||||
joomla_major: 3
|
joomla_major: 3
|
||||||
joomla_minor: 8
|
joomla_minor: 8
|
||||||
joomla_fix: 2
|
joomla_fix: 5
|
||||||
joomla_dist_version: '{{ joomla_major }}.{{ joomla_minor }}.{{ joomla_fix }}'
|
joomla_dist_version: '{{ joomla_major }}.{{ joomla_minor }}.{{ joomla_fix }}'
|
||||||
joomla_dist_file: '{{ joomla_dist_name }}_{{ joomla_dist_version }}-Stable-Full_Package.zip'
|
joomla_dist_file: '{{ joomla_dist_name }}_{{ joomla_dist_version }}-Stable-Full_Package.zip'
|
||||||
joomla_download_version: '{{ joomla_major }}-{{ joomla_minor }}-{{ joomla_fix }}'
|
joomla_download_version: '{{ joomla_major }}-{{ joomla_minor }}-{{ joomla_fix }}'
|
||||||
|
@ -12,14 +12,22 @@ joomla_download_dir: /srv/joomla
|
||||||
joomla_install_dir: /var/www
|
joomla_install_dir: /var/www
|
||||||
|
|
||||||
joomla_php_prereq:
|
joomla_php_prereq:
|
||||||
- php5-json
|
- 'php{{ php_version }}-json'
|
||||||
- php5-intl
|
- 'php{{ php_version }}-intl'
|
||||||
- php5-cli
|
- 'php{{ php_version }}-cli'
|
||||||
- php5-pgsql
|
- 'php{{ php_version }}-gd'
|
||||||
- php5-gd
|
- 'php{{ php_version }}-memcached'
|
||||||
- php5-memcached
|
- 'php{{ php_version }}-zip'
|
||||||
|
- 'php{{ php_version }}-curl'
|
||||||
- php-pear
|
- php-pear
|
||||||
- php-date
|
- php-date
|
||||||
- php-xml-serializer
|
- php-xml-serializer
|
||||||
- imagemagick
|
- imagemagick
|
||||||
|
|
||||||
|
joomla_use_postgresql: True
|
||||||
|
joomla_php_pg_driver:
|
||||||
|
- 'php{{ php_version }}-pgsql'
|
||||||
|
|
||||||
|
joomla_use_mysql: False
|
||||||
|
joomla_php_my_driver:
|
||||||
|
- 'php{{ php_version }}-mysqlnd'
|
||||||
|
|
|
@ -1,43 +1,48 @@
|
||||||
---
|
---
|
||||||
- name: Install the joomla php prerequisites
|
- block:
|
||||||
apt: name={{ item }} state=present
|
- name: Install the joomla php prerequisites
|
||||||
with_items: '{{ joomla_php_prereq }}'
|
apt: name={{ item }} state=present
|
||||||
tags: joomla
|
with_items: '{{ joomla_php_prereq }}'
|
||||||
|
|
||||||
- name: Ensure that the download and install dirs exist
|
- name: Install the php postgresql driver
|
||||||
file: path={{ item }} state=directory
|
apt: name={{ item }} state=present
|
||||||
with_items:
|
with_items: '{{ joomla_php_pg_driver }}'
|
||||||
- '{{ joomla_download_dir }}/joomla-unpacked'
|
when: joomla_use_postgresql
|
||||||
- '{{ joomla_install_dir }}'
|
|
||||||
tags: joomla
|
|
||||||
|
|
||||||
- name: Download the joomla distribution file
|
|
||||||
get_url: url={{ joomla_tar_url }} dest={{ joomla_download_dir }} validate_certs=no
|
|
||||||
register: joomla_download
|
|
||||||
tags: joomla
|
|
||||||
|
|
||||||
- name: Unpack the joomla distribution file
|
- name: Install the php mysql driver
|
||||||
unarchive: copy=no src={{ joomla_download_dir }}/{{ joomla_dist_file }} dest={{ joomla_download_dir }}/joomla-unpacked
|
apt: name={{ item }} state=present
|
||||||
when: ( joomla_download | changed )
|
with_items: '{{ joomla_php_my_driver }}'
|
||||||
tags: joomla
|
when: joomla_use_mysql
|
||||||
|
|
||||||
- name: Move the joomla files to the right place
|
- name: Ensure that the download and install dirs exist
|
||||||
shell: cp -a {{ joomla_download_dir }}/joomla-unpacked/* {{ joomla_install_dir }}/
|
file: path={{ item }} state=directory
|
||||||
args:
|
with_items:
|
||||||
creates: '{{ joomla_install_dir }}/index.php'
|
- '{{ joomla_download_dir }}/joomla-unpacked'
|
||||||
with_items: '{{ phpfpm_pools }}'
|
- '{{ joomla_install_dir }}'
|
||||||
when: ( joomla_download | changed )
|
|
||||||
register: unpack_joomla
|
- name: Download the joomla distribution file
|
||||||
tags: joomla
|
get_url: url={{ joomla_tar_url }} dest={{ joomla_download_dir }} validate_certs=no
|
||||||
|
register: joomla_download
|
||||||
|
|
||||||
- name: Set the correct ownership of the joomla files
|
- name: Unpack the joomla distribution file
|
||||||
file: dest={{ joomla_install_dir }} owner={{ item.user }} group={{ item.group }} recurse=yes state=directory
|
unarchive: copy=no src={{ joomla_download_dir }}/{{ joomla_dist_file }} dest={{ joomla_download_dir }}/joomla-unpacked
|
||||||
with_items: '{{ phpfpm_pools }}'
|
when: ( joomla_download | changed )
|
||||||
when: ( unpack_joomla | changed )
|
|
||||||
tags: joomla
|
|
||||||
|
|
||||||
- name: Remove the original joomla unpacked distribution
|
- name: Move the joomla files to the right place
|
||||||
command: rm -fr {{ joomla_download_dir }}/{{ joomla_dist_name }}
|
shell: cp -a {{ joomla_download_dir }}/joomla-unpacked/* {{ joomla_install_dir }}/
|
||||||
when: ( unpack_joomla | changed )
|
args:
|
||||||
tags: joomla
|
creates: '{{ joomla_install_dir }}/index.php'
|
||||||
|
with_items: '{{ phpfpm_pools }}'
|
||||||
|
when: ( joomla_download | changed )
|
||||||
|
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 | changed )
|
||||||
|
|
||||||
|
- name: Remove the original joomla unpacked distribution
|
||||||
|
command: rm -fr {{ joomla_download_dir }}/{{ joomla_dist_name }}
|
||||||
|
when: ( unpack_joomla | changed )
|
||||||
|
|
||||||
|
tags: joomla
|
||||||
|
|
Loading…
Reference in New Issue