2020-10-02 16:51:05 +02:00
|
|
|
---
|
|
|
|
- name: Create Nextcloud group
|
|
|
|
group:
|
|
|
|
name: "{{ nextcloud_instance_name | mandatory }}"
|
|
|
|
state: present
|
|
|
|
tags:
|
|
|
|
- nextcloud
|
|
|
|
|
|
|
|
- name: Create Nextcloud user
|
|
|
|
user:
|
|
|
|
name: "{{ nextcloud_user | mandatory }}"
|
|
|
|
group: "{{ nextcloud_user }}"
|
|
|
|
home: "{{ nextcloud_home | mandatory }}"
|
|
|
|
shell: '/bin/bash'
|
|
|
|
createhome: True
|
|
|
|
state: present
|
2021-06-08 15:54:25 +02:00
|
|
|
mode: "0755"
|
2020-10-02 16:51:05 +02:00
|
|
|
tags:
|
|
|
|
- nextcloud
|
|
|
|
|
|
|
|
- name: Add the user 'www-data' to Nextcloud group
|
|
|
|
user:
|
|
|
|
name: www-data
|
|
|
|
groups: "{{ nextcloud_user | mandatory }}"
|
|
|
|
append: yes
|
|
|
|
|
|
|
|
- name: Create top-level directories
|
|
|
|
file:
|
|
|
|
dest: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
mode: "0770"
|
|
|
|
owner: "{{ nextcloud_user }}"
|
|
|
|
group: "{{ nextcloud_user }}"
|
2021-05-04 14:18:40 +02:00
|
|
|
loop:
|
2020-10-02 16:51:05 +02:00
|
|
|
- "{{ nextcloud_home }}/log"
|
|
|
|
- "{{ nextcloud_home }}/tmp"
|
|
|
|
- "{{ nextcloud_home }}/data"
|
|
|
|
tags:
|
|
|
|
- nextcloud
|