Jérémy Lecour
28be7d1218
* introduce many variable with sensible defaults * generate an admin password if none is provided (default) * execute occ commands as unprivileged user
33 lines
706 B
YAML
33 lines
706 B
YAML
---
|
|
- name: Create Nextcloud groups
|
|
group:
|
|
name: "{{ nextcloud_instance_name | mandatory }}"
|
|
state: present
|
|
tags:
|
|
- nextcloud
|
|
|
|
- name: Create Nextcloud users
|
|
user:
|
|
name: "{{ nextcloud_user | mandatory }}"
|
|
group: "{{ nextcloud_user }}"
|
|
home: "{{ nextcloud_home | mandatory }}"
|
|
shell: '/bin/bash'
|
|
createhome: True
|
|
state: present
|
|
tags:
|
|
- nextcloud
|
|
|
|
- name: Create top-level directories
|
|
file:
|
|
dest: "{{ item }}"
|
|
state: directory
|
|
mode: "0770"
|
|
owner: "{{ nextcloud_user }}"
|
|
group: "{{ nextcloud_user }}"
|
|
with_items:
|
|
- "{{ nextcloud_home }}/log"
|
|
- "{{ nextcloud_home }}/config"
|
|
- "{{ nextcloud_home }}/tmp"
|
|
tags:
|
|
- nextcloud
|