# This should go in computed_network.yml, but here for now #- name: Compute Nextcloud listen ip addr for nextcloud.conf # set_fact: # nextcloud_required_ip: "{{ ansible_default_ipv4.network }}/{{ ansible_default_ipv4.netmask }}" # when: ansible_default_ipv4.network is defined - name: Create symlink nextcloud.conf from sites-enabled to sites-available for http://box/nextcloud (debuntu) file: src: "/etc/{{ apache_config_dir }}/nextcloud.conf" path: /etc/apache2/sites-enabled/nextcloud.conf state: link when: nextcloud_enabled and is_debuntu - name: Remove symlink nextcloud.conf from /etc/apache2/sites-enabled if not nextcloud_enabled (debuntu) file: path: /etc/apache2/sites-enabled/nextcloud.conf state: absent when: not nextcloud_enabled and is_debuntu - name: Remove sites-available/nextcloud.conf if not nextcloud_enabled (redhat) file: path: "/etc/{{ apache_config_dir }}/nextcloud.conf" state: absent when: not nextcloud_enabled and is_redhat - name: Restart Apache, enabling/disabling http://box/nextcloud systemd: name: "{{ apache_service }}" daemon-reload: yes state: restarted - name: Add 'nextcloud' variable values to {{ iiab_ini_file }} ini_file: path: "{{ iiab_ini_file }}" section: Nextcloud option: "{{ item.option }}" value: "{{ item.value }}" 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 }}"