123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- ---
- # Installs and configures the Z-Push "ActiveSync" push notifications.
-
- - name: Ensure repository key for Z-Push is in place
- apt_key:
- url=http://repo.z-hub.io/z-push:/final/Debian_9.0/Release.key
- state=present
- tags:
- - dependencies
-
- - name: Add Z-Push repository
- apt_repository:
- repo="deb http://repo.z-hub.io/z-push:/final/Debian_9.0/ /"
- tags:
- - dependencies
-
- - name: Install Z-Push
- apt:
- name: "{{ packages }}"
- state: present
- vars:
- packages:
- - z-push-common
- - z-push-backend-combined
- - z-push-backend-imap
- - z-push-backend-carddav
- - z-push-backend-caldav
- - z-push-ipc-sharedmemory
- - z-push-config-apache
- - z-push-autodiscover
- tags:
- - dependencies
-
- - name: Ensure Z-Push state and log directories are in place
- file:
- state=directory
- path={{ item }}
- owner=www-data
- group=www-data
- mode=0755
- with_items:
- - /data/zpush-state
- - /var/log/z-push
- notify: restart apache
-
- - name: Copy Z-Push common config.php into place
- template:
- src=usr_share_z-push_config.php.j2
- dest=/usr/share/z-push/config.php
-
- - name: Copy Z-Push combined backend config.php into place
- template:
- src=usr_share_z-push_backend_combined_config.php.j2
- dest=/usr/share/z-push/backend/combined/config.php
-
- - name: Copy Z-Push IMAP backend config.php into place
- template:
- src=usr_share_z-push_backend_imap_config.php.j2
- dest=/usr/share/z-push/backend/imap/config.php
-
- - name: Copy Z-Push CardDAV backend config.php into place
- template:
- src=usr_share_z-push_backend_carddav_config.php.j2
- dest=/usr/share/z-push/backend/carddav/config.php
-
- - name: Copy Z-Push CalDAV backend config.php into place
- template:
- src=usr_share_z-push_backend_caldav_config.php.j2
- dest=/usr/share/z-push/backend/caldav/config.php
-
- - name: Copy Z-Push autodiscover config.php into place
- template:
- src=usr_share_z-push_autodiscover_config.php.j2
- dest=/usr/share/z-push/autodiscover/config.php
-
- - name: Add Z-Push autodiscover to Apache config
- lineinfile:
- path: /etc/apache2/conf-available/z-push.conf
- line: ' AliasMatch (?i)/Autodiscover/Autodiscover.xml$ "/usr/share/z-push/autodiscover/autodiscover.php"'
- insertafter: 'Microsoft-Server-ActiveSync'
- notify: restart apache
-
- - name: Enable z-push Apache alias and PHP configuration file
- command: a2enconf z-push creates=/etc/apache2/conf-enabled/z-push.conf
- notify: restart apache
-
- - name: Configure z-push logrotate
- copy:
- src=etc_logrotate_z-push
- dest=/etc/logrotate.d/z-push
- owner=root
- group=root
- mode=0644
|