fix: use requires in taskfiles when needed (#1201)

Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
Devin Buhl authored and GitHub committed 2024-01-19 07:49:38 -05:00
1 parent a7c9827c46
commit 5a90397ed5
4 files changed
+10 -9

No files matched your search

+2 -1
View File
@@ -34,8 +34,9 @@ tasks:
prompt: Run Ansible playbook '{{.playbook}}'... continue?
deps: ["deps"]
cmd: .venv/bin/ansible-playbook --inventory {{.ANSIBLE_INVENTORY_FILE}} {{.ANSIBLE_DIR}}/playbooks/{{.playbook}}.yaml {{.CLI_ARGS}}
requires:
vars: ["playbook"]
preconditions:
- { msg: "Missing playbook arg", sh: "test -n {{.playbook}}" }
- { msg: "Missing Ansible inventory file", sh: "test -f {{.ANSIBLE_INVENTORY_FILE}}" }
poweroff: