2018-02-06 23:18:42 +00:00
|
|
|
# This should go in computed_network.yml, but here for now
|
2019-09-01 07:58:04 +00:00
|
|
|
#- 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
|
2017-05-30 02:37:12 +00:00
|
|
|
|
2018-10-29 05:56:27 +00:00
|
|
|
- name: Create symlink nextcloud.conf from sites-enabled to sites-available for http://box/nextcloud (debuntu)
|
2018-02-06 23:18:42 +00:00
|
|
|
file:
|
2018-10-29 05:56:27 +00:00
|
|
|
src: "/etc/{{ apache_config_dir }}/nextcloud.conf"
|
2018-10-28 18:46:47 +00:00
|
|
|
path: /etc/apache2/sites-enabled/nextcloud.conf
|
2018-02-06 23:18:42 +00:00
|
|
|
state: link
|
2017-05-30 02:37:12 +00:00
|
|
|
when: nextcloud_enabled and is_debuntu
|
2017-05-29 22:02:55 +00:00
|
|
|
|
2018-10-29 05:56:27 +00:00
|
|
|
- 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)
|
2018-02-06 23:18:42 +00:00
|
|
|
file:
|
|
|
|
path: "/etc/{{ apache_config_dir }}/nextcloud.conf"
|
|
|
|
state: absent
|
2017-05-30 03:04:04 +00:00
|
|
|
when: not nextcloud_enabled and is_redhat
|
2017-05-29 22:02:55 +00:00
|
|
|
|
2018-10-29 05:56:27 +00:00
|
|
|
- name: Restart Apache, enabling/disabling http://box/nextcloud
|
2019-09-01 07:58:04 +00:00
|
|
|
systemd:
|
2018-02-06 23:18:42 +00:00
|
|
|
name: "{{ apache_service }}"
|
2019-09-01 07:58:04 +00:00
|
|
|
daemon-reload: yes
|
2018-02-06 23:18:42 +00:00
|
|
|
state: restarted
|
2017-05-29 22:02:55 +00:00
|
|
|
|
2019-09-01 07:58:04 +00:00
|
|
|
- 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 }}"
|