fix automouting of gluster mounts on home
This commit is contained in:
51
ansible-5/roles/prod.k3s/tasks/deployments/mariadb.yaml
Normal file
51
ansible-5/roles/prod.k3s/tasks/deployments/mariadb.yaml
Normal file
@@ -0,0 +1,51 @@
|
||||
---
|
||||
#https://github.com/bitnami/charts/tree/master/bitnami/mariadb
|
||||
|
||||
|
||||
- name: "todo: deploy mariadb"
|
||||
debug:
|
||||
msg: "TODO: write deployment tasks"
|
||||
|
||||
- name: Create a namespace for mariadb
|
||||
k8s:
|
||||
kubeconfig: "/etc/rancher/k3s/k3s.yaml"
|
||||
name: mariadb
|
||||
api_version: v1
|
||||
kind: Namespace
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: create persistent volume resources
|
||||
kubernetes.core.k8s:
|
||||
kubeconfig: "/etc/rancher/k3s/k3s.yaml"
|
||||
state: present
|
||||
definition: "{{ lookup('template', item) | from_yaml }}"
|
||||
loop:
|
||||
- mariadb/pv.yaml
|
||||
- mariadb/pv-claim.yaml
|
||||
become: true
|
||||
|
||||
- name: Install mariadb globally available
|
||||
block:
|
||||
- name: Add mariadb chart helm repo
|
||||
local_action:
|
||||
module: kubernetes.core.helm_repository
|
||||
name: bitnami
|
||||
repo_url: https://charts.bitnami.com/bitnami
|
||||
|
||||
- name: load variables files/mariadb/values.yaml
|
||||
ansible.builtin.include_vars:
|
||||
file: files/mariadb/values.yaml
|
||||
name: stash_values
|
||||
|
||||
- name: Install mariadb Release
|
||||
local_action:
|
||||
module: kubernetes.core.helm
|
||||
release_state: present
|
||||
name: "{{apps.mariadb.namespace}}"
|
||||
namespace: mariadb
|
||||
create_namespace: yes
|
||||
update_repo_cache: True
|
||||
chart_ref: bitnami/mariadb
|
||||
values: "{{stash_values}}"
|
||||
wait: true
|
||||
Reference in New Issue
Block a user