initial setup of nextcloud
TODO: database, config, apps folder
This commit is contained in:
@@ -37,7 +37,6 @@
|
||||
namespace: "{{apps.dkregistry.namespace}}"
|
||||
stringData:
|
||||
htpassword: "richard:$2y$05$Zp.GEiUbsGYYVOYWE71truuERCAE.D5wwGzU3Xi3wIVAWjH60t/U."
|
||||
|
||||
become: true
|
||||
|
||||
- name: create docker-registry resources
|
||||
|
||||
54
ansible-5/roles/prod.k3s/tasks/deployments/nextcloud.yaml
Normal file
54
ansible-5/roles/prod.k3s/tasks/deployments/nextcloud.yaml
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
# https://github.com/nextcloud/helm/tree/master/charts/nextcloud
|
||||
|
||||
|
||||
- name: Create a namespace for nextcloud
|
||||
k8s:
|
||||
kubeconfig: "/etc/rancher/k3s/k3s.yaml"
|
||||
name: "{{apps.nextcloud.namespace}}"
|
||||
api_version: v1
|
||||
kind: Namespace
|
||||
state: "{{apps.nextcloud.state}}"
|
||||
become: true
|
||||
|
||||
|
||||
- name: create persistent volume resources
|
||||
kubernetes.core.k8s:
|
||||
kubeconfig: "/etc/rancher/k3s/k3s.yaml"
|
||||
state: "{{apps.nextcloud.state}}"
|
||||
definition: "{{ lookup('template', item) | from_yaml }}"
|
||||
loop:
|
||||
- nextcloud/pv-apps.yaml
|
||||
- nextcloud/pv-data.yaml
|
||||
- nextcloud/pv-configs.yaml
|
||||
- nextcloud/pv-main.yaml
|
||||
- nextcloud/pv-apps-claim.yaml
|
||||
- nextcloud/pv-data-claim.yaml
|
||||
- nextcloud/pv-configs-claim.yaml
|
||||
- nextcloud/pv-main-claim.yaml
|
||||
become: true
|
||||
|
||||
- name: Install nextcloud globally available
|
||||
block:
|
||||
- name: Add nextcloud chart helm repo
|
||||
local_action:
|
||||
module: kubernetes.core.helm_repository
|
||||
name: nextcloud
|
||||
repo_url: https://nextcloud.github.io/helm/
|
||||
|
||||
- name: load variables files/nextcloud/values.yaml
|
||||
ansible.builtin.include_vars:
|
||||
file: files/nextcloud/values.yaml
|
||||
name: stash_values
|
||||
|
||||
- name: Install Nextcloud Release
|
||||
local_action:
|
||||
module: kubernetes.core.helm
|
||||
release_state: "{{apps.nextcloud.state}}"
|
||||
name: nextcloud
|
||||
namespace: "{{apps.nextcloud.namespace}}"
|
||||
create_namespace: yes
|
||||
update_repo_cache: True
|
||||
chart_ref: nextcloud/nextcloud
|
||||
values: "{{stash_values}}"
|
||||
wait: true
|
||||
Reference in New Issue
Block a user