Ansible hostvars

From Freephile Wiki
Revision as of 07:47, 25 August 2025 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

ansible -m debug -a "var=hostvars['wiki.example.net']" localhost will give you all the defined 'variables' associated with a given host


ansible localhost -m ansible.builtin.debug -a "var=hostvars['localhost']" -c local


Setup module

ansible localhost -m setup -a 'gather_subset=!all'


Many of these may be sensitive, so they aren't shown here, but give it a try.