-
Notifications
You must be signed in to change notification settings - Fork 3
/
Taskfile.yml
44 lines (37 loc) · 1.1 KB
/
Taskfile.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
---
version: "3"
vars:
PROJECT_DIR:
sh: "git rev-parse --show-toplevel"
CLUSTER_DIR: "{{.PROJECT_DIR}}/cluster"
ANSIBLE_DIR: "{{.PROJECT_DIR}}/infrastructure/ansible"
ANSIBLE_PLAYBOOK_DIR: "{{.ANSIBLE_DIR}}/playbooks"
ANSIBLE_INVENTORY_DIR: "{{.ANSIBLE_DIR}}/inventory"
K3S_PRIMARY_MASTER_NODE_USERNAME: "ubuntu"
K3S_PRIMARY_MASTER_NODE_ADDR: "10.10.0.10"
K3S_LB_ADDR: "10.10.0.10"
env:
ANSIBLE_CONFIG: "{{.ANSIBLE_DIR}}/ansible.cfg"
KUBECONFIG: "{{.CLUSTER_DIR}}/kubeconfig"
includes:
ansible: .taskfiles/ansible.yml
blocky: .taskfiles/blocky.yml
cluster: .taskfiles/cluster.yml
tasks:
deps:
- task: deps:ansible
- task: deps:pre-commit
deps:ansible:
desc: install/upgrade ansible deps
dir: ansible
cmds:
- "ansible-galaxy install -r requirements.yml --force"
- "ansible-galaxy collection install -r requirements.yml --collections-path ~/.ansible/collections --force"
deps:pre-commit:
desc: install/upgrade pre-commit deps
cmds:
- pre-commit install-hooks
pre-commit:
desc: Run pre-commit
cmds:
- pre-commit run --all-files