feat(build): use Nix flake, go-task and lefthook
This commit is contained in:
parent
c8e984681d
commit
1c91865705
5 changed files with 154 additions and 60 deletions
41
Taskfile.dist.yaml
Normal file
41
Taskfile.dist.yaml
Normal file
|
@ -0,0 +1,41 @@
|
|||
---
|
||||
version: "3"
|
||||
set: [errexit, pipefail, nounset]
|
||||
shopt: [globstar]
|
||||
env:
|
||||
ANSIBLE_OPTIONS: --diff --become-method=doas -K
|
||||
ANSIBLE_PLAYBOOK: playbook.yml
|
||||
ANSIBLE_USER: ephase
|
||||
|
||||
tasks:
|
||||
inventory:
|
||||
cmds:
|
||||
- ansible-inventory --graph -i inventory.ini
|
||||
|
||||
dryrun:
|
||||
deps:
|
||||
- install:deps
|
||||
cmds:
|
||||
- |
|
||||
ansible-playbook -i inventory.ini \
|
||||
--check {{.ANSIBLE_OPTIONS}} {{.ANSIBLE_PLAYBOOK}} \
|
||||
-u {{ .ANSIBLE_USER }}
|
||||
run:
|
||||
deps:
|
||||
- install:deps
|
||||
cmds:
|
||||
- |
|
||||
ansible-playbook -i inventory.ini \
|
||||
{{.ANSIBLE_OPTIONS}} {{.ANSIBLE_PLAYBOOK}} \
|
||||
-u {{.ANSIBLE_USER}}
|
||||
|
||||
install:deps:
|
||||
internal: true
|
||||
cmds:
|
||||
- |
|
||||
ansible-galaxy install \
|
||||
--ignore-errors \
|
||||
--roles-path="deps/" \
|
||||
--role-file="requirements.yml"
|
||||
sources:
|
||||
- requirements.yaml
|
Loading…
Add table
Add a link
Reference in a new issue