title: How to add multiple inventory files in command line while executing a playbook
body: <p>I am having a playbook with two different plays </p>
  
  <pre><code>Sample.yml
      - name : Play1
        hosts: Host1
        tasks:
         ...
      - name: Play2
        hosts: Host2
        tasks:
         ...
  </code></pre>
  
  <p>I need to run this playbook with two different hosts(<em>Host1 and Host2</em>) and these two different hosts are present in two separate files(<em>Hostfile1 and Hostfile2</em>) under inventory/ directory.</p>
  
  <pre><code>inventory/
     Hostfile1
     Hostfile2
     .
     .
     HostfileN
  </code></pre>
  
  <p>I want to know how to include two different hosts file while running the playbook. I know by including the entire folder (<em>inventory/</em>) in command line we can achieve this but I have lot of hosts files inside inventory/ folder so this option will load unused hosts file.</p>
  
  <p>I tried to run like below</p>
  
  <pre><code>ansible-playbook -i inventory/Hostfile1,Hostfile2 sample.yml
  </code></pre>
  
  <p>But this didn't work. So, do anyone know how to run the playbook by providing multiple hosts file in command line?</p>