[mohammedrafi@ansible1 ~]$ ansible --version ansible 2.2.1.0 config file = /etc/ansible/ansible.cfg configured module search path = Default w/o overrides [mohammedrafi@ansible1 ~]$ vim /etc/ansible/hosts [web] 104.154.73.152 [db] 104.198.26.13 [mohammedrafi@ansible1 ~]$ ansible web --list-hosts hosts (1): 104.154.73.152 [mohammedrafi@ansible1 ~]$ ansible db --list-hosts hosts (1): 104.198.26.13 [mohammedrafi@ansible1 ~]$ ansible '*' --list-hosts hosts (2): 104.154.73.152 104.198.26.13 [mohammedrafi@ansible1 ~]$ mkdir dc1 … Continue reading Inventory in ansible
