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
|
||||
@@ -7,7 +7,7 @@
|
||||
path: "{{item.path}}"
|
||||
src: "gluster:/{{item.name}}"
|
||||
fstype: "glusterfs"
|
||||
boot: false
|
||||
boot: true
|
||||
opts: "direct-io-mode=disable,_netdev,x-systemd.automount 0 0"
|
||||
state: "{{item.state}}"
|
||||
with_items: "{{fstab.gluster}}"
|
||||
|
||||
@@ -2,18 +2,22 @@
|
||||
# provisioning services in k3s cluster
|
||||
|
||||
# mount gluster
|
||||
#- include_tasks: gluster.fstab.yml
|
||||
- include_tasks: gluster.fstab.yml
|
||||
#
|
||||
## add helm repositories
|
||||
#- include_tasks: add_repos.yml
|
||||
#
|
||||
#- include_tasks: cert_manager.yml
|
||||
#
|
||||
#- include_tasks: hello-world.yaml
|
||||
- name: deploy cert_manager
|
||||
include_tasks: cert_manager.yml
|
||||
|
||||
- include_tasks: deployments/stash.yaml
|
||||
- name: deploy hello-world
|
||||
include_tasks: hello-world.yaml
|
||||
|
||||
- include_tasks: deployments/argoCD.yaml
|
||||
- name: deploy stash
|
||||
include_tasks: deployments/stash.yaml
|
||||
|
||||
#- name: deploy mariadb
|
||||
# include_tasks: deployments/mariadb.yaml
|
||||
|
||||
|
||||
#-----------------------------------------------------
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
---
|
||||
#https://github.com/bitnami/charts/tree/master/bitnami/mariadb
|
||||
|
||||
|
||||
Reference in New Issue
Block a user