-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathkube-minio-static-files.yml
More file actions
54 lines (48 loc) · 1.73 KB
/
kube-minio-static-files.yml
File metadata and controls
54 lines (48 loc) · 1.73 KB
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
47
48
49
50
51
52
53
54
# WARNING: This is not recommended for production use.
#
# FUTUREWORK: https://github.com/zinfra/backend-issues/issues/1763
- hosts: minio
any_errors_fatal: true
become: true
gather_facts: true
vars:
minio_access_key: 'dummykey'
minio_secret_key: 'dummysecret'
tasks:
- name: "install minio client CLI"
import_role:
name: ansible-minio
tasks_from: install-client
- name: "add 'local' mc config alias with correct credentials"
shell: "mc config host add local http://{{ service_cluster_ip }}:9000 '{{ minio_access_key }}' '{{ minio_secret_key }}'"
- name: "create 'public' bucket"
shell: "mc mb --ignore-existing local/public"
- name: "make the 'public' bucket world-accessible"
shell: "mc policy set public local/public"
run_once: true
- name: "remove unneeded config aliases added by default"
shell: "mc config host rm {{ item }}"
with_items:
- gcs
- s3
- play
- name: "add some file to minio"
import_role:
name: minio-static-files
vars:
prefix: ""
domain: "${environment_name}.${root_domain}"
deeplink_title: "${environment_name}.${root_domain}"
- hosts: minio
any_errors_fatal: true
become: true
gather_facts: true
tags: static-files
roles:
- role: minio-static-files
# Override these variables!
# FUTUREWORK: parse them from a configuration file shared with helm
# (as the domain needs to be known in helm override values.yaml)
prefix: "{{ minio_deeplink_prefix | default('example-') }}"
domain: "{{ minio_deeplink_domain | default('default.domain') }}"
deeplink_title: "{{ minio_deeplink_domain | default('default.domain environment') }}"