aboutsummaryrefslogtreecommitdiff
path: root/content/blog/ansible/dump-all-vars.md
diff options
context:
space:
mode:
Diffstat (limited to 'content/blog/ansible/dump-all-vars.md')
-rw-r--r--content/blog/ansible/dump-all-vars.md14
1 files changed, 11 insertions, 3 deletions
diff --git a/content/blog/ansible/dump-all-vars.md b/content/blog/ansible/dump-all-vars.md
index d5991a3..e1dea05 100644
--- a/content/blog/ansible/dump-all-vars.md
+++ b/content/blog/ansible/dump-all-vars.md
@@ -1,11 +1,13 @@
---
title: "Dump all ansible variables"
-linkTitle: "Dump all ansible variables"
date: 2019-10-15
-description: >
- How to dump all variables used by ansible
+description: How to dump all variables used by ansible in a task
+tags:
+ - ansible
---
+## Task to use
+
Here is the task to use in order to achieve that :
{{< highlight yaml >}}
@@ -13,6 +15,8 @@ Here is the task to use in order to achieve that :
action: template src=dumpall.j2 dest=ansible.all
{{< /highlight >}}
+## Associated template
+
And here is the template to use with it :
{{< highlight jinja >}}
@@ -36,3 +40,7 @@ HOST Variables ("hostvars"):
--------------------------------
{{ hostvars | to_nice_json }}
{{< /highlight >}}
+
+## Output
+
+If you are running a local task, the output will be in your playbook directory. Otherwise, it will be on the target machine(s) in a `.ansible/tmp/ansible.all` file under the user your are connecting the machine(s)' with.