From 1a4981a826bb94c478c6f49721396ec03e02649c Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Thu, 11 Mar 2021 19:47:26 +0100 Subject: First big articles reformatting now that I properly understand hugo --- content/blog/ansible/dump-all-vars.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'content/blog/ansible/dump-all-vars.md') 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. -- cgit v1.2.3