# Apache - name: Enable http://box{{ nextcloud_url }} via Apache # http://box/nextcloud command: a2ensite nextcloud.conf when: apache_install and nextcloud_enabled - name: Disable http://box{{ nextcloud_url }} via Apache # http://box/nextcloud command: a2dissite nextcloud.conf when: apache_install and not nextcloud_enabled - name: Restart Apache systemd service ({{ apache_service }}) systemd: name: "{{ apache_service }}" state: restarted when: apache_enabled | bool # NGINX - name: "SHIM: Enable http://box{{ nextcloud_url }} via NGINX, by installing {{ nginx_conf_dir }}/nextcloud-nginx.conf from template" # http://box/nextcloud template: src: nextcloud-nginx.conf.j2 dest: "{{ nginx_conf_dir }}/nextcloud-nginx.conf" when: nginx_install and nextcloud_enabled - name: "SHIM: Disable http://box{{ nextcloud_url }} via NGINX, by removing {{ nginx_conf_dir }}/nextcloud-nginx.conf" # http://box/nextcloud file: path: "{{ nginx_conf_dir }}/nextcloud-nginx.conf" state: absent when: nginx_install and not nextcloud_enabled - name: Restart 'nginx' systemd service systemd: name: nginx state: restarted when: nginx_enabled | bool - name: Add 'nextcloud' variable values to {{ iiab_ini_file }} ini_file: path: "{{ iiab_ini_file }}" section: Nextcloud option: "{{ item.option }}" value: "{{ item.value | string }}" with_items: - option: name value: Nextcloud - option: description value: '"NextCloud is a local server-based facility for sharing files, photos, contacts, calendars, etc."' - option: path value: "{{ nextcloud_prefix }}/nextcloud" #- option: nextcloud_force_install # value: "{{ nextcloud_force_install }}" - option: nextcloud_orig_src_file value: "{{ nextcloud_orig_src_file }}" - option: nextcloud_src_file value: "{{ nextcloud_src_file }}" - option: nextcloud_enabled value: "{{ nextcloud_enabled }}"