generated from onedr0p/cluster-template
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Taskfile.yaml
69 lines (62 loc) · 1.8 KB
/
Taskfile.yaml
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
58
59
60
61
62
63
64
65
66
67
68
69
---
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: "3"
vars:
# Binaries
PYTHON_BIN: python3
# Directories
ANSIBLE_DIR: "{{.ROOT_DIR}}/ansible"
BOOTSTRAP_DIR: "{{.ROOT_DIR}}/bootstrap"
KUBERNETES_DIR: "{{.ROOT_DIR}}/kubernetes"
PRIVATE_DIR: "{{.ROOT_DIR}}/.private"
SCRIPTS_DIR: "{{.ROOT_DIR}}/scripts"
# Files
AGE_FILE: "{{.ROOT_DIR}}/age.key"
BOOTSTRAP_CONFIG_FILE: "{{.ROOT_DIR}}/config.yaml"
KUBECONFIG_FILE: "{{.ROOT_DIR}}/kubeconfig"
PIP_REQUIREMENTS_FILE: "{{.ROOT_DIR}}/requirements.txt"
includes:
ansible: .taskfiles/ansible/taskfile.yaml
flux:
taskfile: .taskfiles/flux/taskfile.yaml
aliases: ["f"]
db: .taskfiles/db/taskfile.yaml
hack: .taskfiles/hack/taskfile.yaml
kubernetes:
taskfile: .taskfiles/kubernetes/taskfile.yaml
aliases: ["k", "k3s", "k8s"]
repository:
taskfile: .taskfiles/repository/taskfile.yaml
aliases: ["repo"]
rook:
taskfile: .taskfiles/rook/taskfile.yaml
aliases: ["ceph"]
sops: .taskfiles/sops/taskfile.yaml
volsync: .taskfiles/volsync/taskfile.yaml
workstation:
taskfile: .taskfiles/workstation/taskfile.yaml
aliases: ["ws"]
dotenv: [".env"]
env:
# K8S_AUTH_KUBECONFIG: "{{.ROOT_DIR}}/kubeconfig"
KUBECONFIG: "{{.KUBECONFIG_FILE}}"
PYTHONDONTWRITEBYTECODE: "1"
SOPS_AGE_KEY_FILE: "{{.ROOT_DIR}}/age.key"
VIRTUAL_ENV: "{{.ROOT_DIR}}/.venv"
tasks:
default: task -l
check:
desc: Lint and Format with precommit
cmd: pre-commit run --all-files
bootstrap:
vars: &vars
cephnodes: optiplex3 optiplex4 optiplex5 # optiplex0 optiplex1 optiplex2
cephdisk: /dev/sda
cmds:
- task: :rook:reset
vars: *vars
- task: :flux:bootstrap
vars: *vars
preconditions:
- msg: "k3s cluster not found."
sh: kubectl get nodes