-
Notifications
You must be signed in to change notification settings - Fork 1
/
site_local.yml
46 lines (46 loc) · 1.54 KB
/
site_local.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
- name: Base config
hosts: all
connection: local
become: false
gather_facts: false
run_once: true
vars:
ansible_python_interpreter: "{{ ansible_playbook_python }}"
vars_files:
- "group_vars/local/base/k8.yml"
tasks:
- name: Add Bitnami chart repo
community.kubernetes.helm_repository:
name: bitnami
repo_url: 'https://charts.bitnami.com/bitnami'
tags:
- repo
- name: PostgreSQL database server
community.kubernetes.helm:
name: postgresql
chart_ref: bitnami/postgresql
release_namespace: default
update_repo_cache: true
chart_version: 10.2.2
atomic: true
create_namespace: true
kubeconfig: '{{ k8s_kubeconfig }}'
values: "{{ lookup('template', 'k8-charts/postgresql/values.yml') | from_yaml }}"
state: "{{ state | default('present') }}"
tags:
- postgresql
- name: px-ss
community.kubernetes.k8s:
definition: '{{ item }}'
kubeconfig: '{{ k8s_kubeconfig }}'
namespace: default
apply: true
state: "{{ state | default('present') }}"
loop:
- "{{ lookup('template', 'k8-charts/px-ss/serviceaccount.yml') | from_yaml_all | list }}"
- "{{ lookup('template', 'k8-charts/px-ss/persistent-volume-claim.yml') | from_yaml_all | list }}"
- "{{ lookup('template', 'k8-charts/px-ss/service.yml') | from_yaml_all | list }}"
- "{{ lookup('template', 'k8-charts/px-ss/deployments.yml') | from_yaml_all | list }}"
tags:
- px-ss