Ingen beskrivning
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

z-push.yml 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. - deps
  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. command: tar xzf z-push-{{ zpush_version }}.tar.gz chdir=/root creates=/root/z-push-{{ zpush_version }}
  16. - name: Create /usr/share/z-push
  17. file: state=directory path=/usr/share/z-push
  18. - name: Copy z-push source files to /usr/share/z-push
  19. shell: cp -R z-push-{{ zpush_version }}/* /usr/share/z-push/ chdir=/root
  20. - name: Remove downloaded, temporary z-push source files
  21. shell: rm -rf z-push* chdir=/root
  22. - name: Ensure z-push state and log directories are in place
  23. file: state=directory path={{ item }} owner=www-data group=www-data mode=755
  24. with_items:
  25. - /decrypted/zpush-state
  26. - /var/log/z-push
  27. notify: restart apache
  28. - name: Copy z-push's config.php into place
  29. template: src=usr_share_z-push_config.php.j2 dest=/usr/share/z-push/config.php
  30. - name: Configure z-push apache alias and php settings
  31. copy: src=etc_apache2_conf.d_z-push.conf dest=/etc/apache2/conf.d/z-push.conf
  32. notify: restart apache
  33. when: ansible_distribution_release != 'trusty'
  34. - name: Create z-push apache alias and php configuration file for Ubuntu Trusty
  35. copy: src=etc_apache2_conf.d_z-push.conf dest=/etc/apache2/conf-available/z-push.conf
  36. when: ansible_distribution_release == 'trusty'
  37. - name: Enable z-push Apache alias and PHP configuration file for Ubuntu Trusty
  38. command: a2enconf z-push creates=/etc/apache2/conf-enabled/z-push.conf
  39. notify: restart apache
  40. when: ansible_distribution_release == 'trusty'
  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