-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtaskfile.yaml
53 lines (45 loc) · 1.34 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
---
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: "3"
vars:
AGE_FILE: "{{.ROOT_DIR}}/age.key"
KUBERNETES_DIR: "{{.ROOT_DIR}}/kubernetes"
includes:
flux: .taskfiles/flux/Taskfile.yaml
bootstrap: .taskfiles/bootstrap/Taskfile.yaml
talos: .taskfiles/talos/Taskfile.yaml
sops: .taskfiles/sops/Taskfile.yaml
kubespray: .taskfiles/kubespray/Taskfile.yaml
tf: .taskfiles/terraform/Taskfile.yaml
tasks:
default:
desc: List all tasks
silent: false
cmd: task --list-all
generate-graph:
desc: Generate graph
cmd: dot -Tpng ./doc/comm.dot -o ./doc/comm.png
encrypt-secrets:
desc: Encrypt secrets
cmd: sops -e main.secret.env > main.secret.sops.env
lint:
desc: Lint
cmd: |
yamllint .
ansible-lint ansible/
ansible-run:
desc: Run ansible playbook
dir: ansible
cmds:
- cmd: |
set -a
export ANSIBLE_CONFIG=ansible.cfg
export ANSIBLE_FORCE_COLOR=True
# no_proxy needed to circumvent a forking error on mac os
export no_proxy='*'
# import secrets to env
source <(sops -d {{.ROOT_DIR}}/main.secret.sops.env)
ansible-playbook {{.CLI_ARGS}}
ansible-install-requirements:
desc: Install ansible requirements
cmd: ansible-galaxy install -r ansible/roles/requirements.yml --force