45 lines
1.3 KiB
YAML
45 lines
1.3 KiB
YAML
|
---
|
||
|
|
||
|
- name: Download latest NextCloud
|
||
|
ansible.builtin.get_url:
|
||
|
url: https://download.nextcloud.com/server/releases/latest.zip
|
||
|
dest: /tmp/latest.zip
|
||
|
mode: "0644"
|
||
|
owner: www-data
|
||
|
group: www-data
|
||
|
when: not nextcloud_cached
|
||
|
|
||
|
# XXX Downloading nextcloud takes an absurd amount of time once in a while.
|
||
|
# XXX You can get around this by having a local copy when debugging.
|
||
|
|
||
|
- name: Use local copy of latest NextCloud
|
||
|
ansible.builtin.copy:
|
||
|
src: files/latest.zip
|
||
|
dest: /tmp/latest.zip
|
||
|
mode: "0644"
|
||
|
when: nextcloud_cached
|
||
|
|
||
|
- name: Unzip latest NextCloud
|
||
|
ansible.builtin.unarchive:
|
||
|
src: /tmp/latest.zip
|
||
|
dest: "{{ document_root }}"
|
||
|
copy: false
|
||
|
group: www-data
|
||
|
owner: www-data
|
||
|
mode: "0755"
|
||
|
|
||
|
- name: Cleanup /tmp
|
||
|
ansible.builtin.file:
|
||
|
name: /tmp/latest.zip
|
||
|
state: absent
|
||
|
|
||
|
# XXX if you are running nextcloud in a VM and using portforwarding
|
||
|
# XXX to reach the VM's webserver from the host using something like
|
||
|
# XXX 'localhost:8080', you need to uncomment this.
|
||
|
# XXX NOTE! config.php will not exist until after you go to localhost:8080
|
||
|
# - name: Allow local remote servers
|
||
|
# ansible.builtin.lineinfile:
|
||
|
# path: /data/www/vhosts.d/nextcloud/config/config.php
|
||
|
# insertbefore: '^\);'
|
||
|
# line: " 'allow_local_remote_servers' => true,"
|