1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 19:52:06 +00:00
iiab/roles/nextcloud/tasks/enable.yml

59 lines
1.9 KiB
YAML
Raw Normal View History

# Apache
2017-05-30 02:37:12 +00:00
- name: Enable http://box{{ nextcloud_url }} via Apache # http://box/nextcloud
command: a2ensite nextcloud.conf
when: apache_install and nextcloud_enabled
2018-10-29 05:56:27 +00:00
- name: Disable http://box{{ nextcloud_url }} via Apache # http://box/nextcloud
command: a2dissite nextcloud.conf
when: apache_install and not nextcloud_enabled
2020-01-04 11:47:41 +00:00
- name: Restart Apache systemd service ({{ apache_service }})
systemd:
name: "{{ apache_service }}"
state: restarted
2020-01-04 11:47:41 +00:00
when: apache_enabled | bool
# NGINX
- name: "SHIM: Enable http://box{{ nextcloud_url }} via NGINX, by installing {{ nginx_config_dir }}/nextcloud-nginx.conf from template" # http://box/nextcloud
template:
src: nextcloud-nginx.conf.j2
dest: "{{ nginx_config_dir }}/nextcloud-nginx.conf"
when: nginx_install and nextcloud_enabled
- name: "SHIM: Disable http://box{{ nextcloud_url }} via NGINX, by removing {{ nginx_config_dir }}/nextcloud-nginx.conf" # http://box/nextcloud
file:
path: "{{ nginx_config_dir }}/nextcloud-nginx.conf"
state: absent
when: nginx_install and not nextcloud_enabled
- name: Restart 'nginx' systemd service
2020-01-04 11:47:41 +00:00
systemd:
name: nginx
state: restarted
when: nginx_enabled | bool
2017-05-29 22:02:55 +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 | 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 }}"