blob: ac17702ba59400143a1cd76c97067a4e0cfe5c78 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
---
- name: 'setup | Ensure required vars are set'
ansible.builtin.assert:
that:
- item | mandatory
loop:
- '{{ nextcloud_nas_mount_path }}'
- '{{ nextcloud_php_max_mem_mb }}'
- '{{ nextcloud_php_max_upload_size_gb }}'
no_log: true
- name: 'setup | Install required pkgs'
ansible.builtin.package:
name:
- 'nfs-common'
- name: 'setup | Create the mount dir'
ansible.builtin.file:
path: '/mnt/data'
state: 'directory'
mode: '755'
- name: 'setup | Setup the NFS mount'
ansible.posix.mount:
src: '{{ nextcloud_nas_mount_path }}'
path: '/mnt/data'
state: 'mounted'
fstype: 'nfs'
- name: 'setup | Copy the docker-compose file'
ansible.builtin.template:
src: 'docker-compose.yaml.j2'
dest: 'docker-compose.yaml'
mode: '644'
- name: 'setup | Start the service'
ansible.builtin.command: 'docker-compose up -d'
register: '_compose_up_cmd'
changed_when: '_compose_up_cmd.rc == 0'
|