Bez popisu
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.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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: Download z-push release
  11. get_url:
  12. url=http://download.z-push.org/final/2.1/z-push-{{ zpush_version }}.tar.gz
  13. dest=/root/z-push-{{ zpush_version }}.tar.gz
  14. - name: Decompress z-push source
  15. unarchive: src=/root/z-push-{{ zpush_version }}.tar.gz
  16. dest=/root copy=no
  17. creates=/root/z-push-{{ zpush_version }}
  18. - name: Create /usr/share/z-push
  19. file: state=directory path=/usr/share/z-push
  20. - name: Copy z-push source files to /usr/share/z-push
  21. shell: cp -R z-push-{{ zpush_version }}/* /usr/share/z-push/ chdir=/root
  22. tags:
  23. - skip_ansible_lint
  24. - name: Remove downloaded, temporary z-push source files
  25. shell: rm -rf z-push* chdir=/root
  26. tags:
  27. - skip_ansible_lint
  28. - name: Ensure z-push state and log directories are in place
  29. file: state=directory path={{ item }} owner=www-data group=www-data mode=0755
  30. with_items:
  31. - /decrypted/zpush-state
  32. - /var/log/z-push
  33. notify: restart apache
  34. - name: Copy z-push's config.php into place
  35. template: src=usr_share_z-push_config.php.j2 dest=/usr/share/z-push/config.php
  36. - name: Create z-push apache alias and php configuration file
  37. copy: src=etc_apache2_conf.d_z-push.conf dest=/etc/apache2/conf-available/z-push.conf
  38. - name: Enable z-push Apache alias and PHP configuration file
  39. command: a2enconf z-push creates=/etc/apache2/conf-enabled/z-push.conf
  40. notify: restart apache
  41. - name: Configure z-push logrotate
  42. copy: src=etc_logrotate_z-push dest=/etc/logrotate.d/z-push owner=root group=root mode=0644