Nessuna descrizione
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.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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: Ensure Z-Push state and log directories are in place
  49. file:
  50. state=directory
  51. path={{ item }}
  52. owner=www-data
  53. group=www-data
  54. mode=0755
  55. with_items:
  56. - /data/zpush-state
  57. - /var/log/z-push
  58. notify: restart apache
  59. - name: Copy Z-Push common config.php into place
  60. template:
  61. src=usr_share_z-push_config.php.j2
  62. dest=/usr/share/z-push/config.php
  63. - name: Copy Z-Push combined backend config.php into place
  64. template:
  65. src=usr_share_z-push_backend_combined_config.php.j2
  66. dest=/usr/share/z-push/backend/combined/config.php
  67. - name: Copy Z-Push IMAP backend config.php into place
  68. template:
  69. src=usr_share_z-push_backend_imap_config.php.j2
  70. dest=/usr/share/z-push/backend/imap/config.php
  71. - name: Copy Z-Push CardDAV backend config.php into place
  72. template:
  73. src=usr_share_z-push_backend_carddav_config.php.j2
  74. dest=/usr/share/z-push/backend/carddav/config.php
  75. - name: Copy Z-Push CalDAV backend config.php into place
  76. template:
  77. src=usr_share_z-push_backend_caldav_config.php.j2
  78. dest=/usr/share/z-push/backend/caldav/config.php
  79. - name: Copy Z-Push autodiscover config.php into place
  80. template:
  81. src=usr_share_z-push_autodiscover_config.php.j2
  82. dest=/usr/share/z-push/autodiscover/config.php
  83. - name: Add Z-Push autodiscover to Apache config
  84. lineinfile:
  85. path: /etc/apache2/conf-available/z-push.conf
  86. line: ' AliasMatch (?i)/Autodiscover/Autodiscover.xml$ "/usr/share/z-push/autodiscover/autodiscover.php"'
  87. insertafter: 'Microsoft-Server-ActiveSync'
  88. notify: restart apache
  89. - name: Enable z-push Apache alias and PHP configuration file
  90. command: a2enconf z-push creates=/etc/apache2/conf-enabled/z-push.conf
  91. notify: restart apache
  92. - name: Configure z-push logrotate
  93. copy:
  94. src=etc_logrotate_z-push
  95. dest=/etc/logrotate.d/z-push.lr
  96. owner=root
  97. group=root
  98. mode=0644