Use persistent volume claim with stash

This commit is contained in:
2022-09-18 10:34:50 -04:00
parent e6b7e104cd
commit d72ab51f82
6 changed files with 113 additions and 13 deletions

View File

@@ -0,0 +1,47 @@
---
# stash media manager
# helm should be run from local environment
- name: check we can access the cluster
local_action:
module: kubernetes.core.helm_info
# kubeconfig: "/etc/rancher/k3s/k3s.yaml"
context: "{{kube_context}}"
name: test
release_namespace: kube-system
# release_state: all
register: default_namespace
- name: create persistent volume resources
kubernetes.core.k8s:
kubeconfig: "/etc/rancher/k3s/k3s.yaml"
state: present
definition: "{{ lookup('file', item) | from_yaml }}"
loop:
- stash/pv.yaml
- stash/pv-claim.yaml
become: true
- name: Add stash chart helm repo
local_action:
module: kubernetes.core.helm_repository
name: k8s-at-home
repo_url: https://k8s-at-home.com/charts/
- name: load variables files/stash/values.yaml
ansible.builtin.include_vars:
file: files/stash/values.yaml
name: stash_values
- name: Install stash Chart
local_action:
module: kubernetes.core.helm
release_state: present
name: stash
namespace: testing
create_namespace: yes
update_repo_cache: True
chart_ref: k8s-at-home/stash
values: "{{stash_values}}"
wait: true