説明なし
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

z-push.yml 2.1KB

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