41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
---
|
|
- name: Nextcloud Playbook (K8s)
|
|
hosts: nextcloud
|
|
gather_facts: true
|
|
|
|
# Specific tasks for this playbook
|
|
tasks:
|
|
- name: Set required facts
|
|
ansible.builtin.set_fact:
|
|
nextcloud_home: "{{ persistent_data | default('/var/lib') }}/nextcloud"
|
|
nextcloud_mysql_home: "{{ database_path | default('/var/lib') }}/mysql.nextcloud"
|
|
nextcloud_user_id: 33
|
|
nextcloud_group_id: 33
|
|
mysql_user_id: 999
|
|
mysql_group_id: 107
|
|
tags: always
|
|
|
|
- name: Create required nextcloud data folder
|
|
become: true
|
|
ansible.builtin.file:
|
|
state: directory
|
|
path: "{{ nextcloud_home }}"
|
|
mode: "0750"
|
|
owner: "{{ nextcloud_user_id }}"
|
|
group: "{{ nextcloud_group_id }}"
|
|
tags:
|
|
- tasks
|
|
- tasks::folders
|
|
|
|
- name: Create required mysql data folder
|
|
become: true
|
|
ansible.builtin.file:
|
|
state: directory
|
|
path: "{{ nextcloud_mysql_home }}"
|
|
mode: "0755"
|
|
owner: "{{ mysql_user_id }}"
|
|
group: "{{ mysql_group_id }}"
|
|
tags:
|
|
- tasks
|
|
- tasks::folders
|