Geen omschrijving
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 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. ---
  2. # Installs and configures the Z-Push "ActiveSync" push notifications.
  3. - name: Ensure repository key for Z-Push is in place
  4. apt_key:
  5. url=http://repo.z-hub.io/z-push:/final/Debian_9.0/Release.key
  6. state=present
  7. tags:
  8. - dependencies
  9. - name: Add Z-Push repository
  10. apt_repository:
  11. repo="deb http://repo.z-hub.io/z-push:/final/Debian_9.0/ /"
  12. tags:
  13. - dependencies
  14. - name: Install Z-Push
  15. apt:
  16. name: "{{ packages }}"
  17. state: present
  18. vars:
  19. packages:
  20. - z-push-common
  21. - z-push-backend-combined
  22. - z-push-backend-imap
  23. - z-push-backend-carddav
  24. - z-push-backend-caldav
  25. - z-push-ipc-sharedmemory
  26. - z-push-config-apache
  27. - z-push-autodiscover
  28. tags:
  29. - dependencies
  30. - name: Ensure Z-Push state and log directories are in place
  31. file:
  32. state=directory
  33. path={{ item }}
  34. owner=www-data
  35. group=www-data
  36. mode=0755
  37. with_items:
  38. - /data/zpush-state
  39. - /var/log/z-push
  40. notify: restart apache
  41. - name: Copy Z-Push common config.php into place
  42. template:
  43. src=usr_share_z-push_config.php.j2
  44. dest=/usr/share/z-push/config.php
  45. - name: Copy Z-Push combined backend config.php into place
  46. template:
  47. src=usr_share_z-push_backend_combined_config.php.j2
  48. dest=/usr/share/z-push/backend/combined/config.php
  49. - name: Copy Z-Push IMAP backend config.php into place
  50. template:
  51. src=usr_share_z-push_backend_imap_config.php.j2
  52. dest=/usr/share/z-push/backend/imap/config.php
  53. - name: Copy Z-Push CardDAV backend config.php into place
  54. template:
  55. src=usr_share_z-push_backend_carddav_config.php.j2
  56. dest=/usr/share/z-push/backend/carddav/config.php
  57. - name: Copy Z-Push CalDAV backend config.php into place
  58. template:
  59. src=usr_share_z-push_backend_caldav_config.php.j2
  60. dest=/usr/share/z-push/backend/caldav/config.php
  61. - name: Copy Z-Push autodiscover config.php into place
  62. template:
  63. src=usr_share_z-push_autodiscover_config.php.j2
  64. dest=/usr/share/z-push/autodiscover/config.php
  65. - name: Add Z-Push autodiscover to Apache config
  66. lineinfile:
  67. path: /etc/apache2/conf-available/z-push.conf
  68. line: ' AliasMatch (?i)/Autodiscover/Autodiscover.xml$ "/usr/share/z-push/autodiscover/autodiscover.php"'
  69. insertafter: 'Microsoft-Server-ActiveSync'
  70. notify: restart apache
  71. - name: Enable z-push Apache alias and PHP configuration file
  72. command: a2enconf z-push creates=/etc/apache2/conf-enabled/z-push.conf
  73. notify: restart apache
  74. - name: Configure z-push logrotate
  75. copy:
  76. src=etc_logrotate_z-push
  77. dest=/etc/logrotate.d/z-push
  78. owner=root
  79. group=root
  80. mode=0644