execute on all hosts:
ansible-playbook -i inventory/file/path playbook/file/path
for all hosts:
ansible -i inventory/file/path all -m setup
for a single host:
ansible 192.168.1.20 -i inventory/file/path -m setup
redirect the output to a file:
ansible -i inventory/file/path all -m setup > system_facts.txtthese facts are stored in the ansible_facts variable and they are used, for example, in the when condition:
- name: install apache yum: name: httpd state: latest when: ansible_facts['os_family'] == 'RedHat'
README STILL IN PROGRESS...