--- # 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 when: ansible_distribution_version == '9' - name: Add Z-Push repository apt_repository: repo="deb http://repo.z-hub.io/z-push:/final/Debian_9.0/ /" tags: - dependencies when: ansible_distribution_version == '9' - 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 when: ansible_distribution_version == '9' - name: Install Z-Push apt: name: "{{ packages }}" state: present vars: packages: - z-push - z-push-common - z-push-backend-combined - z-push-backend-imap - z-push-backend-carddav - z-push-backend-caldav tags: - dependencies when: ansible_distribution_version == '10' - 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 when: ansible_distribution_version != '11' - 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 when: ansible_distribution_version != '11' - 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 when: ansible_distribution_version != '11' - 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 when: ansible_distribution_version != '11' - 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 when: ansible_distribution_version != '11' - 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 when: ansible_distribution_version != '11' - 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 when: ansible_distribution_version != '11' - 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 when: ansible_distribution_version != '11' - 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 when: ansible_distribution_version != '11' - name: Configure z-push logrotate copy: src=etc_logrotate_z-push dest=/etc/logrotate.d/z-push.lr owner=root group=root mode=0644 when: ansible_distribution_version != '11'