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 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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. when: ansible_distribution_version == '9'
  10. - name: Add Z-Push repository
  11. apt_repository:
  12. repo="deb http://repo.z-hub.io/z-push:/final/Debian_9.0/ /"
  13. tags:
  14. - dependencies
  15. when: ansible_distribution_version == '9'
  16. - name: Install Z-Push
  17. apt:
  18. name: "{{ packages }}"
  19. state: present
  20. vars:
  21. packages:
  22. - z-push-common
  23. - z-push-backend-combined
  24. - z-push-backend-imap
  25. - z-push-backend-carddav
  26. - z-push-backend-caldav
  27. - z-push-ipc-sharedmemory
  28. - z-push-config-apache
  29. - z-push-autodiscover
  30. tags:
  31. - dependencies
  32. when: ansible_distribution_version == '9'
  33. - name: Install Z-Push
  34. apt:
  35. name: "{{ packages }}"
  36. state: present
  37. vars:
  38. packages:
  39. - z-push
  40. - z-push-common
  41. - z-push-backend-combined
  42. - z-push-backend-imap
  43. - z-push-backend-carddav
  44. - z-push-backend-caldav
  45. tags:
  46. - dependencies
  47. when: ansible_distribution_version == '10'
  48. - name: Install Z-Push
  49. apt:
  50. name: "{{ packages }}"
  51. state: present
  52. vars:
  53. packages:
  54. - z-push
  55. - z-push-common
  56. - z-push-backend-combined
  57. - z-push-backend-imap
  58. - z-push-backend-carddav
  59. - z-push-backend-caldav
  60. tags:
  61. - dependencies
  62. when: ansible_distribution_version == '11'
  63. - name: Ensure Z-Push state and log directories are in place
  64. file:
  65. state=directory
  66. path={{ item }}
  67. owner=www-data
  68. group=www-data
  69. mode=0755
  70. with_items:
  71. - /data/zpush-state
  72. - /var/log/z-push
  73. notify: restart apache
  74. - name: Copy Z-Push common config.php into place
  75. template:
  76. src=usr_share_z-push_config.php.j2
  77. dest=/usr/share/z-push/config.php
  78. - name: Copy Z-Push combined backend config.php into place
  79. template:
  80. src=usr_share_z-push_backend_combined_config.php.j2
  81. dest=/usr/share/z-push/backend/combined/config.php
  82. - name: Copy Z-Push IMAP backend config.php into place
  83. template:
  84. src=usr_share_z-push_backend_imap_config.php.j2
  85. dest=/usr/share/z-push/backend/imap/config.php
  86. - name: Copy Z-Push CardDAV backend config.php into place
  87. template:
  88. src=usr_share_z-push_backend_carddav_config.php.j2
  89. dest=/usr/share/z-push/backend/carddav/config.php
  90. - name: Copy Z-Push CalDAV backend config.php into place
  91. template:
  92. src=usr_share_z-push_backend_caldav_config.php.j2
  93. dest=/usr/share/z-push/backend/caldav/config.php
  94. - name: Copy Z-Push autodiscover config.php into place
  95. template:
  96. src=usr_share_z-push_autodiscover_config.php.j2
  97. dest=/usr/share/z-push/autodiscover/config.php
  98. - name: Add Z-Push autodiscover to Apache config
  99. lineinfile:
  100. path: /etc/apache2/conf-available/z-push.conf
  101. line: ' AliasMatch (?i)/Autodiscover/Autodiscover.xml$ "/usr/share/z-push/autodiscover/autodiscover.php"'
  102. insertafter: 'Microsoft-Server-ActiveSync'
  103. notify: restart apache
  104. - name: Enable z-push Apache alias and PHP configuration file
  105. command: a2enconf z-push creates=/etc/apache2/conf-enabled/z-push.conf
  106. notify: restart apache
  107. - name: Configure z-push logrotate
  108. copy:
  109. src=etc_logrotate_z-push
  110. dest=/etc/logrotate.d/z-push.lr
  111. owner=root
  112. group=root
  113. mode=0644