First big articles reformatting now that I properly understand hugo
This commit is contained in:
parent
5e6844592a
commit
1a4981a826
40 changed files with 184 additions and 173 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue