Sin descripción
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

z-push.yml 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. - name: Install required packages for z-push
  2. apt: pkg={{ item }} state=installed
  3. with_items:
  4. - php5
  5. - php5-cli
  6. - php-soap
  7. - php5-imap
  8. - name: Download z-push release
  9. get_url:
  10. url=http://download.z-push.org/final/2.1/z-push-{{ zpush_version }}.tar.gz
  11. dest=/root/z-push-{{ zpush_version }}.tar.gz
  12. - name: Decompress z-push source
  13. command: tar xzf z-push-{{ zpush_version }}.tar.gz chdir=/root creates=/root/z-push-{{ zpush_version }}
  14. - name: Create /usr/share/z-push
  15. file: state=directory path=/usr/share/z-push
  16. - name: Copy z-push source files to /usr/share/z-push
  17. shell: cp -R z-push-{{ zpush_version }}/* /usr/share/z-push/ chdir=/root
  18. - name: Remove downloaded, temporary z-push source files
  19. shell: rm -rf z-push* chdir=/root
  20. - name: Ensure z-push state and log directories are in place
  21. file: state=directory path={{ item }} owner=www-data group=www-data mode=755
  22. with_items:
  23. - /decrypted/zpush-state
  24. - /var/log/z-push
  25. notify: restart apache
  26. - name: Copy z-push's config.php into place
  27. template: src=usr_share_z-push_config.php.j2 dest=/usr/share/z-push/config.php
  28. - name: Configure z-push apache alias and php settings
  29. copy: src=etc_apache2_conf.d_z-push.conf dest=/etc/apache2/conf.d/z-push.conf
  30. notify: restart apache
  31. when: ansible_distribution_release != 'trusty'
  32. - name: Create z-push apache alias and php configuration file for Ubuntu Trusty
  33. copy: src=etc_apache2_conf.d_z-push.conf dest=/etc/apache2/conf-available/z-push.conf
  34. when: ansible_distribution_release == 'trusty'
  35. - name: Enable z-push Apache alias and PHP configuration file for Ubuntu Trusty
  36. command: a2enconf z-push creates=/etc/apache2/conf-enabled/z-push.conf
  37. notify: restart apache
  38. when: ansible_distribution_release == 'trusty'
  39. - name: Configure z-push logrotate
  40. copy: src=etc_logrotate_z-push dest=/etc/logrotate.d/z-push owner=root group=root mode=0644