-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
57 lines (50 loc) · 1.64 KB
/
Taskfile.yaml
File metadata and controls
57 lines (50 loc) · 1.64 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
55
56
57
---
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: "3"
set: [pipefail]
shopt: [globstar]
vars:
CLUSTER: '{{.CLUSTER | default "main"}}'
BOOTSTRAP_DIR: "{{.ROOT_DIR}}/bootstrap"
KUBERNETES_DIR: "{{.ROOT_DIR}}/kubernetes"
SCRIPTS_DIR: "{{.ROOT_DIR}}/scripts"
BOOTSTRAP_CONFIG_FILE: "{{.ROOT_DIR}}/config.yaml"
SOPS_CONFIG_FILE: "{{.ROOT_DIR}}/.sops.yaml"
TALOS_DIR: "{{.ROOT_DIR}}/talos"
env:
KUBECONFIG: "{{.ROOT_DIR}}/kubeconfig"
PYTHONDONTWRITEBYTECODE: "1"
SOPS_AGE_KEY_FILE: "{{.ROOT_DIR}}/age.key"
VIRTUAL_ENV: "{{.ROOT_DIR}}/.venv"
TALOSCONFIG: "{{.TALOSCONFIG}}"
includes:
bootstrap: .taskfiles/bootstrap
kubernetes: .taskfiles/kubernetes
plex: .taskfiles/plex
talos: .taskfiles/talos
volsync: .taskfiles/volsync
workstation: .taskfiles/workstation
user:
taskfile: .taskfiles/User
optional: true
tasks:
default: task --list
init:
desc: Initialize configuration files
cmd: cp {{.BOOTSTRAP_CONFIG_FILE | replace ".yaml" ".sample.yaml"}} {{.BOOTSTRAP_CONFIG_FILE}}
status:
- test -f {{.BOOTSTRAP_CONFIG_FILE}}
configure:
desc: Render and validate configuration files
prompt: Any conflicting files in the kubernetes directory will be overwritten... continue?
cmds:
- task: bootstrap:template
- task: bootstrap:secrets
- task: kubernetes:kubeconform
- >
{{if eq .HOME_SOPS_AGE_KEY_FILE_EXISTS "true"}}
echo "WARNING: SOPS Age key found in home directory, this may cause conflicts."
{{end}}
vars:
HOME_SOPS_AGE_KEY_FILE_EXISTS:
sh: test -f ~/.config/sops/age/keys.txt && echo true || echo false