Timeline for List ALL Ansible variables for a host or group with an ad hoc command?
Current License: CC BY-SA 4.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 10, 2022 at 19:11 | comment | added | dfelix | This worked beautifully for me. Thank you. | |
| S Aug 2, 2022 at 0:23 | history | suggested | β.εηοιτ.βε | CC BY-SA 4.0 |
The command there was not aligned to what the example run below was actually showing, missing the host pattern positional argument
|
| Jul 12, 2022 at 14:39 | review | Suggested edits | |||
| S Aug 2, 2022 at 0:23 | |||||
| Sep 18, 2017 at 12:09 | comment | added | Montaro |
This worked for me ansible host-name -m debug -a "var=[var_name]" -i inventory/testing/hosts
|
|
| Mar 11, 2016 at 15:07 | comment | added | akostadinov |
For 1.9.4 it doesn't return the stuff returned by ansible my.hostname.example.com -m setup -i ../my/inventory/hosts.example -u root
|
|
| S Mar 9, 2016 at 14:54 | history | suggested | stuart-warren | CC BY-SA 3.0 |
suggest fix for ansible > 2.0
|
| Mar 9, 2016 at 13:37 | comment | added | stuart-warren |
Suggested edit to use "var=hostvars[inventory_hostname]" on ansible > 2.0
|
|
| Mar 9, 2016 at 13:37 | review | Suggested edits | |||
| S Mar 9, 2016 at 14:54 | |||||
| Feb 25, 2016 at 10:34 | comment | added | Zulakis |
With ansible 2.0.2, this doesn't seem to work anymore. The output is localhost | SUCCESS => { "hostvars": "<ansible.vars.hostvars.HostVars object at 0x7f320943da10>" }
|
|
| Feb 2, 2016 at 17:44 | vote | accept | 0xC0000022L | ||
| Jun 11, 2015 at 0:29 | history | answered | yaegashi | CC BY-SA 3.0 |