Including json file with include_vars module in ansible playbook
<p>The <a href="http://docs.ansible.com/ansible/include_vars_module.html" rel="nofollow noreferrer">include vars module</a> says that a JSON file can be used to load vars. However, when I try to use the module in my playbook, I get a YAML syntax error.</p>

<pre><code>---
- hosts: my_hosts
- include_vars: out.json
- tasks:
    command: hostname
</code></pre>

<p>The syntax error is:</p>

<blockquote>
  <p>ERROR! 'include_vars' is not a valid attribute for a Play</p>
</blockquote>