From c9a730e5b363a10639309c81dab838232ee434b6 Mon Sep 17 00:00:00 2001 From: Jasper Ras Date: Fri, 25 Apr 2025 16:15:25 +0200 Subject: vault backup: 2025-04-25 16:15:25 --- Ansible ad-hoc commands.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Ansible ad-hoc commands.md (limited to 'Ansible ad-hoc commands.md') diff --git a/Ansible ad-hoc commands.md b/Ansible ad-hoc commands.md new file mode 100644 index 0000000..38c4286 --- /dev/null +++ b/Ansible ad-hoc commands.md @@ -0,0 +1,16 @@ +--- +tags: + - ansible +--- +Configure ansible.cfg with:\ +``` +stdout_callback=json +bin_ansible_callbacks = True +``` +Outputs result as json, so we can jq it + +Can also be done with env var: +``` +ANSIBLE_LOAD_CALLBACK_PLUGINS=1 \ +ANSIBLE_STDOUT_CALLBACK=json \ +``` \ No newline at end of file -- cgit v1.2.3