Roundcube playbook
This commit is contained in:
parent
4520e759c6
commit
d8f8e0c9ee
@ -0,0 +1,30 @@
|
||||
---
|
||||
# This playbook install roundcubemail
|
||||
- hosts: all
|
||||
vars:
|
||||
version: 1.2.1
|
||||
vhosts: /home/vhosts/roundcubemail
|
||||
opcache: fcgi
|
||||
keep_releases: 3
|
||||
become: yes
|
||||
tasks:
|
||||
- name: ROUNDCUBE | Download
|
||||
get_url: url="https://github.com/roundcube/roundcubemail/releases/download/{{ version }}/roundcubemail-{{ version }}-complete.tar.gz" dest="{{ vhosts }}/releases/roundcubemail-{{ version }}" validate_certs=no
|
||||
- name: ROUNDCUBE | Extract
|
||||
unarchive: src="{{ vhosts }}/releases/roundcubemail-{{ version }}-complete.tar.gz" dest="{{ vhosts }}/releases/" copy=no
|
||||
- name: ROUNDCUBE | Delete
|
||||
file: path="{{ vhosts }}/releases/roundcubemail-{{ version }}-complete.tar.gz" state=absent
|
||||
- name: ROUNDCUBE | Config
|
||||
copy: src="./config/config.inc.php" dest="{{ vhosts }}/releases/roundcubemail-{{ version }}/config/config.inc.php"
|
||||
- name: ROUNDCUBE | .user.ini
|
||||
copy: src="./config/.user.ini" dest="{{ vhosts }}/releases/roundcubemail-{{ version }}/.user.ini"
|
||||
- name: ROUNDCUBE | Permission
|
||||
file: path="{{ vhosts }}/releases/roundcubemail-{{ version }}" owner=www-data group=www-data
|
||||
- name: ROUNDCUBE | Symlink
|
||||
file: src="{{ vhosts }}/releases/roundcubemail-{{ version }}" dest="{{ vhosts }}/current" owner=www-data group=www-data state=link
|
||||
- name: ROUNDCUBE | Opcache
|
||||
command: "/usr/bin/php /home/deploy/cachetool.phar opcache:reset --fcgi=/var/run/php5-fpm.sock"
|
||||
when: opcache is defined and opcache == "fcgi"
|
||||
- name: ROUNDCUBE | Cleanup
|
||||
shell: ls -1dt {{ vhosts }}/releases/* | tail -n +{{ keep_releases | int + 1 }} | xargs rm -rf
|
||||
when: keep_releases > 0
|
Loading…
Reference in New Issue
Block a user