123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- - name: Install required packages for z-push
- apt: pkg={{ item }} state=installed
- with_items:
- - php-soap
- - php5
- - php5-cli
- - php5-imap
-
- - name: Download z-push release
- get_url:
- url=http://download.z-push.org/final/2.1/z-push-{{ zpush_version }}.tar.gz
- dest=/root/z-push-{{ zpush_version }}.tar.gz
-
- - name: Decompress z-push source
- command: tar xzf z-push-{{ zpush_version }}.tar.gz chdir=/root creates=/root/z-push-{{ zpush_version }}
-
- - name: Create /usr/share/z-push
- file: state=directory path=/usr/share/z-push
-
- - name: Copy z-push source files to /usr/share/z-push
- shell: cp -R z-push-{{ zpush_version }}/* /usr/share/z-push/ chdir=/root
-
- - name: Remove downloaded, temporary z-push source files
- shell: rm -rf z-push* chdir=/root
-
- - name: Ensure z-push state and log directories are in place
- file: state=directory path={{ item }} owner=www-data group=www-data mode=755
- with_items:
- - /decrypted/zpush-state
- - /var/log/z-push
- notify: restart apache
-
- - name: Copy z-push's config.php into place
- template: src=usr_share_z-push_config.php.j2 dest=/usr/share/z-push/config.php
-
- - name: Configure z-push apache alias and php settings
- copy: src=etc_apache2_conf.d_z-push.conf dest=/etc/apache2/conf.d/z-push.conf
- notify: restart apache
- when: ansible_distribution_release != 'trusty'
-
- - name: Create z-push apache alias and php configuration file for Ubuntu Trusty
- copy: src=etc_apache2_conf.d_z-push.conf dest=/etc/apache2/conf-available/z-push.conf
- when: ansible_distribution_release == 'trusty'
-
- - name: Enable z-push Apache alias and PHP configuration file for Ubuntu Trusty
- command: a2enconf z-push creates=/etc/apache2/conf-enabled/z-push.conf
- notify: restart apache
- when: ansible_distribution_release == 'trusty'
-
- - name: Configure z-push logrotate
- copy: src=etc_logrotate_z-push dest=/etc/logrotate.d/z-push owner=root group=root mode=0644
|