How do i filter out specific ansible facts?
-
Link: http://docs.ansible.com/ansible/setup_module.html
man ansible: http://lightnetics.nodebb.com/post/884The command below gets a ton of facts.
$ ansible perth -m setup
If you want just the type of OS across many hosts do this.
$ ansible perth -m setup -a 'filter=ansible_distribution_version' bigansible | SUCCESS => { "ansible_facts": { "ansible_distribution_version": "7.2" }, "changed": false }
The filter can be anything listed in the command $ ansible perth -m setup
© Lightnetics 2024