No Description
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.8KB

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