title: How to pass list of hosts in ansible-playbook command?
body: <p>I'm trying to run a playbook and provide the host directly from the command line because I frequently change the host IP and export it to the environment variable, called JUMPBOX_AZR. I have checked out Ansible documentation and for the ansible-playbook, the <code>-i</code> option it says: </p>
  
  <blockquote>
    <p>specify inventory host path or comma separated host list.
    –inventory-file is deprecated</p>
  </blockquote>
  
  <p>With "comma separated host list", I thought I could do something like this:</p>
  
  <pre><code>ansible-playbook -i "${JUMPBOX_AZR}" ~/terraform_azure/Ansible/prepare_acs.yml
  </code></pre>
  
  <p>But apparently not because I'm getting this error:</p>
  
  <pre><code>[WARNING]: Unable to parse /home/pedro/terraform_azure/Ansible/23.100.53.196 as an inventory source
  </code></pre>
  
  <p>What's the easiest way to supply a host to a playbook, if that host is in a local environment variable?</p>