summaryrefslogtreecommitdiff
path: root/Ansible ad-hoc commands.md
diff options
context:
space:
mode:
authorJasper Ras <jaspert.ras@gmail.com>2025-04-26 13:14:25 +0200
committerJasper Ras <jaspert.ras@gmail.com>2025-04-26 13:14:25 +0200
commit89688082f4c85cbfcf045e1f85dac5c69285c23e (patch)
tree709be9a6f0c9a802e0487e92e81f4281f4ec345b /Ansible ad-hoc commands.md
parentf0a7d563a385663513f24aecad92219ecfc83bd8 (diff)
parent468e33e7926897756acfe0d483633fb36949ebc5 (diff)
vault backup: 2025-04-26 13:14:25
Diffstat (limited to 'Ansible ad-hoc commands.md')
-rw-r--r--Ansible ad-hoc commands.md16
1 files changed, 16 insertions, 0 deletions
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