Ansible hostvars

From Freephile Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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.