title: Can I use variable for hosts in Ansible template?
body: <p>Is it possible to substitute hosts: target with variable? </p>
  
  <pre><code>- name: ansible application deploy
    hosts: {{ vm_ip }}
    vars:
      project_path: "{{ host_project_path|default('/var/www/html') }}"
  </code></pre>
  
  <p>I have tried passing vm_ip using <code>--extra-vars="vm_ip: IPP_ADDR "</code> on the command line, but it never worked.</p>