From c0ca6be2ba8e8dd6209afd354f41754800f034cb Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Fri, 12 Jan 2024 16:20:23 -0500 Subject: [PATCH] fix: ansible taskfile ad-hoc tasks now work Signed-off-by: Devin Buhl --- .taskfiles/AnsibleTasks.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.taskfiles/AnsibleTasks.yaml b/.taskfiles/AnsibleTasks.yaml index 5c8060f5..a59540ff 100644 --- a/.taskfiles/AnsibleTasks.yaml +++ b/.taskfiles/AnsibleTasks.yaml @@ -38,19 +38,23 @@ tasks: poweroff: desc: Shutdown all the k8s nodes - cmd: ansible kubernetes -i {{.ANSIBLE_DIR}}/inventory/hosts.yaml -a '/usr/bin/systemctl poweroff' --become + deps: ["deps"] + cmd: .venv/bin/ansible kubernetes -i {{.ANSIBLE_DIR}}/inventory/hosts.yaml -a '/usr/bin/systemctl poweroff' --become list: desc: List all the hosts - cmd: ansible kubernetes -i {{.ANSIBLE_DIR}}/inventory/hosts.yaml --list-hosts + deps: ["deps"] + cmd: .venv/bin/ansible kubernetes -i {{.ANSIBLE_DIR}}/inventory/hosts.yaml --list-hosts ping: desc: Ping all the hosts - cmd: ansible kubernetes -i {{.ANSIBLE_DIR}}/inventory/hosts.yaml --one-line -m 'ping' + deps: ["deps"] + cmd: .venv/bin/ansible kubernetes -i {{.ANSIBLE_DIR}}/inventory/hosts.yaml --one-line -m 'ping' uptime: desc: Uptime of all the hosts - cmd: ansible kubernetes -i {{.ANSIBLE_DIR}}/inventory/hosts.yaml --one-line -a 'uptime' + deps: ["deps"] + cmd: .venv/bin/ansible kubernetes -i {{.ANSIBLE_DIR}}/inventory/hosts.yaml --one-line -a 'uptime' .venv: internal: true