-
Notifications
You must be signed in to change notification settings - Fork 12
/
Taskfile.yml
44 lines (36 loc) · 989 Bytes
/
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
version: '3'
tasks:
default:
cmds:
- task -l
dev:
desc: Setup development environment
cmds:
- python3 -m venv .venv && source .venv/bin/activate
- pip install -r requirements.txt
- task galaxy
galaxy:
desc: Install Ansible Galaxy roles
cmds:
- ansible-galaxy install -p .ansible_galaxy/roles -r requirements.yml
- ansible-galaxy collection install -p .ansible_galaxy/collections -r requirements.yml
lint:
desc: Runs Ansible Lint agains manifests
cmds:
- ansible-lint playbooks/setup.yml roles
check:
desc: Check syntax of playbooks
cmds:
- ansible-playbook --syntax-check playbooks/*.yml
run:
desc: Run main playbook
cmds:
- ansible-playbook --ask-become-pass
run-tag:
desc: Run main playbook with tag
cmds:
- ansible-playbook --ask-become-pass --tags {{ .TAG }} playbooks/setup.yml
preconditions:
- test -n "${TAG}"
vars:
TAG: ${TAG}