<h5 dir="auto">ISSUE TYPE</h5>

<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">modules/cloud/vmware/vmware_guest.py</p>
<h5 dir="auto">ANSIBLE VERSION</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.4.1.0
  config file = /home/jzimmett/.ansible.cfg
  configured module search path = [u'/home/jzimmett/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, May  3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]
"><pre class="notranslate"><code class="notranslate">ansible 2.4.1.0
  config file = /home/jzimmett/.ansible.cfg
  configured module search path = [u'/home/jzimmett/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, May  3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]

</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">DEFAULT_ROLES_PATH(env: ANSIBLE_ROLES_PATH) = [u'/home/xxxx/workspace/devops/platform-roles<br>
HOST_KEY_CHECKING(/home/xxxx/.ansible.cfg) = False<br>
RETRY_FILES_ENABLED(/home/xxxx/.ansible.cfg) = False</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Red Hat 7.4</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">Same issue as <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="260413355" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/30879" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/30879/hovercard" href="https://github.com/ansible/ansible/issues/30879">#30879</a>. vmware_guest is not handling the "cluster" option correctly and fails that it can not find the data store.</p>
<p dir="auto">I have modified the vmware_guest.py to work properly and will do a pull request.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>


<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- name: &quot;Create DHCP VM {{ vm_name }}&quot;
  vmware_guest:
    hostname: &quot;{{ vc_hostname }}&quot;
    username: &quot;{{ vc_user }}&quot;
    password: &quot;{{ vc_pass }}&quot;
    cluster: &quot;{{ vc_cluster }}&quot;
    datacenter: &quot;{{ vc_datacenter }}&quot;
    template: &quot;{{ vm_template }}&quot;
    name: &quot;{{ vm_name }}&quot;
    networks:
      - vlan: &quot;{{ vm_vlan }}&quot;
        type: &quot;dhcp&quot;
    annotation: &quot;{{ vm_notes }}&quot;
    folder: &quot;{{ vc_folder }}&quot;
    disk:
      - size_gb: 30
        type: thin
        datastore: &quot;{{ vm_datastore }}&quot;
    hardware:
      memory_mb: &quot;{{ vm_memory }}&quot;
      num_cpus: &quot;{{ vm_cpu }}&quot;
    customization:
      hostname: &quot;{{ vm_name }}&quot;
      domain: &quot;{{ vm_domain }}&quot;
    customvalues:
      - { key: &quot;Created By&quot;, value: &quot;Ansible&quot; }
      - { key: &quot;Department&quot;, value: &quot;Engineering&quot; }
      - { key: &quot;Requested By&quot;, value: &quot;Jeff Yates&quot; }
      - { key: &quot;Date Created&quot;, value: &quot;{{ ansible_date_time.date }}&quot; }
    state: poweredon
    validate_certs: no
    force: yes
    wait_for_ip_address: &quot;{{ vm_wait_for | default('yes') }}&quot;
  register: newvm
"><pre class="notranslate">- <span class="pl-ent">name</span>: <span class="pl-s"><span class="pl-pds">"</span>Create DHCP VM {{ vm_name }}<span class="pl-pds">"</span></span>
  <span class="pl-ent">vmware_guest</span>:
    <span class="pl-ent">hostname</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ vc_hostname }}<span class="pl-pds">"</span></span>
    <span class="pl-ent">username</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ vc_user }}<span class="pl-pds">"</span></span>
    <span class="pl-ent">password</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ vc_pass }}<span class="pl-pds">"</span></span>
    <span class="pl-ent">cluster</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ vc_cluster }}<span class="pl-pds">"</span></span>
    <span class="pl-ent">datacenter</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ vc_datacenter }}<span class="pl-pds">"</span></span>
    <span class="pl-ent">template</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ vm_template }}<span class="pl-pds">"</span></span>
    <span class="pl-ent">name</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ vm_name }}<span class="pl-pds">"</span></span>
    <span class="pl-ent">networks</span>:
      - <span class="pl-ent">vlan</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ vm_vlan }}<span class="pl-pds">"</span></span>
        <span class="pl-ent">type</span>: <span class="pl-s"><span class="pl-pds">"</span>dhcp<span class="pl-pds">"</span></span>
    <span class="pl-ent">annotation</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ vm_notes }}<span class="pl-pds">"</span></span>
    <span class="pl-ent">folder</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ vc_folder }}<span class="pl-pds">"</span></span>
    <span class="pl-ent">disk</span>:
      - <span class="pl-ent">size_gb</span>: <span class="pl-c1">30</span>
        <span class="pl-ent">type</span>: <span class="pl-s">thin</span>
        <span class="pl-ent">datastore</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ vm_datastore }}<span class="pl-pds">"</span></span>
    <span class="pl-ent">hardware</span>:
      <span class="pl-ent">memory_mb</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ vm_memory }}<span class="pl-pds">"</span></span>
      <span class="pl-ent">num_cpus</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ vm_cpu }}<span class="pl-pds">"</span></span>
    <span class="pl-ent">customization</span>:
      <span class="pl-ent">hostname</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ vm_name }}<span class="pl-pds">"</span></span>
      <span class="pl-ent">domain</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ vm_domain }}<span class="pl-pds">"</span></span>
    <span class="pl-ent">customvalues</span>:
      - <span class="pl-s">{ key: "Created By", value: "Ansible" }</span>
      - <span class="pl-s">{ key: "Department", value: "Engineering" }</span>
      - <span class="pl-s">{ key: "Requested By", value: "Jeff Yates" }</span>
      - <span class="pl-s">{ key: "Date Created", value: "{{ ansible_date_time.date }}" }</span>
    <span class="pl-ent">state</span>: <span class="pl-s">poweredon</span>
    <span class="pl-ent">validate_certs</span>: <span class="pl-s">no</span>
    <span class="pl-ent">force</span>: <span class="pl-s">yes</span>
    <span class="pl-ent">wait_for_ip_address</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ vm_wait_for | default('yes') }}<span class="pl-pds">"</span></span>
  <span class="pl-ent">register</span>: <span class="pl-s">newvm</span>
</pre></div>

<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">Handle the Cluster option properly</p>
<h5 dir="auto">ACTUAL RESULTS</h5>


<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Unable to access the virtual machine configuration: Unable to access file [Tintri-UAT-RPM]
"><pre class="notranslate"><code class="notranslate">Unable to access the virtual machine configuration: Unable to access file [Tintri-UAT-RPM]

</code></pre></div>
<h5 dir="auto">Issue Type:</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">Ansible Version:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible --version
ansible 2.1.0 (devel b2a6784a9f) last updated 2016/03/03 23:00:55 (GMT +000)
  lib/ansible/modules/core: (detached HEAD 0bbb7ba38d) last updated 2016/03/03 23:00:59 (GMT +000)
  lib/ansible/modules/extras: (detached HEAD 39e4040685) last updated 2016/03/03 23:01:00 (GMT +000)
  config file =
  configured module search path = /opt/ansible/ansible/library"><pre class="notranslate"><code class="notranslate">$ ansible --version
ansible 2.1.0 (devel b2a6784a9f) last updated 2016/03/03 23:00:55 (GMT +000)
  lib/ansible/modules/core: (detached HEAD 0bbb7ba38d) last updated 2016/03/03 23:00:59 (GMT +000)
  lib/ansible/modules/extras: (detached HEAD 39e4040685) last updated 2016/03/03 23:01:00 (GMT +000)
  config file =
  configured module search path = /opt/ansible/ansible/library
</code></pre></div>
<h5 dir="auto">Ansible Configuration:</h5>
<ul dir="auto">
<li><code class="notranslate">N/A</code>: No <code class="notranslate">ansible.cfg</code> / No settings changed from default</li>
<li><code class="notranslate">source</code>d included ENV script from: <code class="notranslate">/opt/ansible/ansible/hacking/env-setup</code></li>
<li><code class="notranslate">ANSIBLE_HOME=/opt/ansible/ansible</code></li>
<li><code class="notranslate">PYTHONPATH=/opt/ansible/ansible/lib:</code></li>
</ul>
<h5 dir="auto">Environment:</h5>
<p dir="auto">OS running Docker build from: <a href="https://travis-ci.org/trinitronx/ansible-docker-base/jobs/113524091#L14-L18" rel="nofollow"><code class="notranslate">Ubuntu 14.04.3 LTS</code></a><br>
OS running Ansible from: <code class="notranslate">CentOS Linux 7</code> (from: Docker image: <a href="https://hub.docker.com/_/centos/" rel="nofollow">centos:7</a>)<br>
OS managing: <code class="notranslate">N/A</code></p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">Integration tests for <code class="notranslate">parsing</code> make target (playbook: <code class="notranslate">/opt/ansible/ansible/test/integration/roles/test_bad_parsing/tasks/main.yml:29</code>) fail on current <a href="https://github.com/ansible/ansible/tree/b2a6784a9f/test">ansible/ansible@devel</a> branch.  Not sure whether to trust that this Ansible build is ok for production use, so I'm blocked on updating my <a href="https://hub.docker.com/r/trinitronx/ansible-base/" rel="nofollow">built container</a> to benefit from fixes since it was last built.</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<ol dir="auto">
<li>Install <a href="https://github.com/ansible/ansible/tree/b2a6784a9f/test">ansible/ansible@b2a6784a9f</a> to <code class="notranslate">/opt/ansible/ansible</code> on a test host</li>
<li>Run the included <code class="notranslate">hacking/env-setup</code> script: <code class="notranslate">source /opt/ansible/ansible/hacking/env-setup</code></li>
<li>Run the included integration tests with <code class="notranslate">cd /opt/ansible/ansible &amp;&amp; make -j 1 parsing test_var_precedence test_templating_settings includes test_hash test_handlers test_group_by</code></li>
<li><code class="notranslate">test_bad_parsing</code> fails at <code class="notranslate">/opt/ansible/ansible/test/integration/roles/test_bad_parsing/tasks/main.yml:29</code></li>
</ol>
<p dir="auto">Error looks like:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
  File &quot;/root/.ansible/tmp/ansible-tmp-1457046096.64-209878160685501/file&quot;, line 2491, in &lt;module&gt;
    main()
  File &quot;/root/.ansible/tmp/ansible-tmp-1457046096.64-209878160685501/file&quot;, line 409, in main
    open(path, 'w').close()
IOError: [Errno 2] No such file or directory: '/root/ansible_testing/ansible_test_file'

fatal: [testhost]: FAILED! =&gt; {&quot;changed&quot;: false, &quot;failed&quot;: true, &quot;invocation&quot;: {&quot;module_name&quot;: &quot;file&quot;}, &quot;parsed&quot;: false}"><pre class="notranslate"><code class="notranslate">An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
  File "/root/.ansible/tmp/ansible-tmp-1457046096.64-209878160685501/file", line 2491, in &lt;module&gt;
    main()
  File "/root/.ansible/tmp/ansible-tmp-1457046096.64-209878160685501/file", line 409, in main
    open(path, 'w').close()
IOError: [Errno 2] No such file or directory: '/root/ansible_testing/ansible_test_file'

fatal: [testhost]: FAILED! =&gt; {"changed": false, "failed": true, "invocation": {"module_name": "file"}, "parsed": false}
</code></pre></div>
<h5 dir="auto">Expected Results:</h5>
<p dir="auto">Tests should pass, <a href="https://travis-ci.org/trinitronx/ansible-docker-base/jobs/110899113#L3792-L3822" rel="nofollow">output</a> should look like:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [test_bad_parsing : file] *************************************************
task path: /opt/ansible/ansible/test/integration/roles/test_bad_parsing/tasks/main.yml:29
ESTABLISH LOCAL CONNECTION FOR USER: root
127.0.0.1 EXEC /bin/sh -c '( umask 22 &amp;&amp; mkdir -p &quot;` echo $HOME/.ansible/tmp/ansible-tmp-1456130434.04-39704483789163 `&quot; &amp;&amp; echo &quot;` echo $HOME/.ansible/tmp/ansible-tmp-1456130434.04-39704483789163 `&quot; )'
127.0.0.1 PUT /tmp/tmp6K5guK TO /root/.ansible/tmp/ansible-tmp-1456130434.04-39704483789163/file
127.0.0.1 EXEC /bin/sh -c 'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1456130434.04-39704483789163/file; rm -rf &quot;/root/.ansible/tmp/ansible-tmp-1456130434.04-39704483789163/&quot; &gt; /dev/null 2&gt;&amp;1'
changed: [testhost] =&gt; {&quot;changed&quot;: true, &quot;dest&quot;: &quot;/root/ansible_testing/ansible_test_file&quot;, &quot;diff&quot;: {&quot;after&quot;: {&quot;path&quot;: &quot;/root/ansible_testing/ansible_test_file&quot;, &quot;state&quot;: &quot;touch&quot;}, &quot;before&quot;: {&quot;path&quot;: &quot;/root/ansible_testing/ansible_test_file&quot;, &quot;state&quot;: &quot;absent&quot;}}, &quot;gid&quot;: 0, &quot;group&quot;: &quot;root&quot;, &quot;invocation&quot;: {&quot;module_args&quot;: {&quot;backup&quot;: null, &quot;content&quot;: null, &quot;delimiter&quot;: null, &quot;diff_peek&quot;: null, &quot;directory_mode&quot;: null, &quot;follow&quot;: false, &quot;force&quot;: false, &quot;group&quot;: null, &quot;mode&quot;: null, &quot;name&quot;: &quot;~/ansible_testing/ansible_test_file&quot;, &quot;original_basename&quot;: null, &quot;owner&quot;: null, &quot;path&quot;: &quot;/root/ansible_testing/ansible_test_file&quot;, &quot;recurse&quot;: false, &quot;regexp&quot;: null, &quot;remote_src&quot;: null, &quot;selevel&quot;: null, &quot;serole&quot;: null, &quot;setype&quot;: null, &quot;seuser&quot;: null, &quot;src&quot;: null, &quot;state&quot;: &quot;touch&quot;, &quot;validate&quot;: null}, &quot;module_name&quot;: &quot;file&quot;}, &quot;mode&quot;: &quot;0644&quot;, &quot;owner&quot;: &quot;root&quot;, &quot;size&quot;: 0, &quot;state&quot;: &quot;file&quot;, &quot;uid&quot;: 0}

TASK [test_bad_parsing : include test that we cannot insert arguments] *********
task path: /opt/ansible/ansible/test/integration/roles/test_bad_parsing/tasks/main.yml:32
included: /opt/ansible/ansible/test/integration/roles/test_bad_parsing/tasks/scenario1.yml for testhost

TASK [test_bad_parsing : include test that we cannot duplicate arguments] ******
task path: /opt/ansible/ansible/test/integration/roles/test_bad_parsing/tasks/main.yml:36
included: /opt/ansible/ansible/test/integration/roles/test_bad_parsing/tasks/scenario2.yml for testhost

TASK [test_bad_parsing : include test that we can't do this for the shell module] ***
task path: /opt/ansible/ansible/test/integration/roles/test_bad_parsing/tasks/main.yml:40
included: /opt/ansible/ansible/test/integration/roles/test_bad_parsing/tasks/scenario3.yml for testhost

TASK [test_bad_parsing : include test that we can't go all Little Bobby Droptables on a quoted var to add more] ***
task path: /opt/ansible/ansible/test/integration/roles/test_bad_parsing/tasks/main.yml:44
included: /opt/ansible/ansible/test/integration/roles/test_bad_parsing/tasks/scenario4.yml for testhost

TASK [test_bad_parsing : test that a missing/malformed jinja2 filter fails] ****
task path: /opt/ansible/ansible/test/integration/roles/test_bad_parsing/tasks/main.yml:48
fatal: [testhost]: FAILED! =&gt; {&quot;failed&quot;: true, &quot;msg&quot;: &quot;template error while templating string: no filter named 'badfiltername'. String: {{output_dir|badfiltername}}&quot;}
...ignoring

PLAY RECAP *********************************************************************
testhost                   : ok=9    changed=2    unreachable=0    failed=0"><pre class="notranslate"><code class="notranslate">TASK [test_bad_parsing : file] *************************************************
task path: /opt/ansible/ansible/test/integration/roles/test_bad_parsing/tasks/main.yml:29
ESTABLISH LOCAL CONNECTION FOR USER: root
127.0.0.1 EXEC /bin/sh -c '( umask 22 &amp;&amp; mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1456130434.04-39704483789163 `" &amp;&amp; echo "` echo $HOME/.ansible/tmp/ansible-tmp-1456130434.04-39704483789163 `" )'
127.0.0.1 PUT /tmp/tmp6K5guK TO /root/.ansible/tmp/ansible-tmp-1456130434.04-39704483789163/file
127.0.0.1 EXEC /bin/sh -c 'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1456130434.04-39704483789163/file; rm -rf "/root/.ansible/tmp/ansible-tmp-1456130434.04-39704483789163/" &gt; /dev/null 2&gt;&amp;1'
changed: [testhost] =&gt; {"changed": true, "dest": "/root/ansible_testing/ansible_test_file", "diff": {"after": {"path": "/root/ansible_testing/ansible_test_file", "state": "touch"}, "before": {"path": "/root/ansible_testing/ansible_test_file", "state": "absent"}}, "gid": 0, "group": "root", "invocation": {"module_args": {"backup": null, "content": null, "delimiter": null, "diff_peek": null, "directory_mode": null, "follow": false, "force": false, "group": null, "mode": null, "name": "~/ansible_testing/ansible_test_file", "original_basename": null, "owner": null, "path": "/root/ansible_testing/ansible_test_file", "recurse": false, "regexp": null, "remote_src": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": null, "state": "touch", "validate": null}, "module_name": "file"}, "mode": "0644", "owner": "root", "size": 0, "state": "file", "uid": 0}

TASK [test_bad_parsing : include test that we cannot insert arguments] *********
task path: /opt/ansible/ansible/test/integration/roles/test_bad_parsing/tasks/main.yml:32
included: /opt/ansible/ansible/test/integration/roles/test_bad_parsing/tasks/scenario1.yml for testhost

TASK [test_bad_parsing : include test that we cannot duplicate arguments] ******
task path: /opt/ansible/ansible/test/integration/roles/test_bad_parsing/tasks/main.yml:36
included: /opt/ansible/ansible/test/integration/roles/test_bad_parsing/tasks/scenario2.yml for testhost

TASK [test_bad_parsing : include test that we can't do this for the shell module] ***
task path: /opt/ansible/ansible/test/integration/roles/test_bad_parsing/tasks/main.yml:40
included: /opt/ansible/ansible/test/integration/roles/test_bad_parsing/tasks/scenario3.yml for testhost

TASK [test_bad_parsing : include test that we can't go all Little Bobby Droptables on a quoted var to add more] ***
task path: /opt/ansible/ansible/test/integration/roles/test_bad_parsing/tasks/main.yml:44
included: /opt/ansible/ansible/test/integration/roles/test_bad_parsing/tasks/scenario4.yml for testhost

TASK [test_bad_parsing : test that a missing/malformed jinja2 filter fails] ****
task path: /opt/ansible/ansible/test/integration/roles/test_bad_parsing/tasks/main.yml:48
fatal: [testhost]: FAILED! =&gt; {"failed": true, "msg": "template error while templating string: no filter named 'badfiltername'. String: {{output_dir|badfiltername}}"}
...ignoring

PLAY RECAP *********************************************************************
testhost                   : ok=9    changed=2    unreachable=0    failed=0
</code></pre></div>
<h5 dir="auto">Actual Results:</h5>
<p dir="auto"><a href="https://travis-ci.org/trinitronx/ansible-docker-base/jobs/113524091#L3801-L3813" rel="nofollow">Build + integration tests</a> failed with error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [test_bad_parsing : file] *************************************************
task path: /opt/ansible/ansible/test/integration/roles/test_bad_parsing/tasks/main.yml:29
ESTABLISH LOCAL CONNECTION FOR USER: root
127.0.0.1 EXEC /bin/sh -c '( umask 22 &amp;&amp; mkdir -p &quot;` echo $HOME/.ansible/tmp/ansible-tmp-1457046096.64-209878160685501 `&quot; &amp;&amp; echo &quot;` echo $HOME/.ansible/tmp/ansible-tmp-1457046096.64-209878160685501 `&quot; )'
127.0.0.1 PUT /tmp/tmpXbN09c TO /root/.ansible/tmp/ansible-tmp-1457046096.64-209878160685501/file
127.0.0.1 EXEC /bin/sh -c 'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1457046096.64-209878160685501/file; rm -rf &quot;/root/.ansible/tmp/ansible-tmp-1457046096.64-209878160685501/&quot; &gt; /dev/null 2&gt;&amp;1'
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
  File &quot;/root/.ansible/tmp/ansible-tmp-1457046096.64-209878160685501/file&quot;, line 2491, in &lt;module&gt;
    main()
  File &quot;/root/.ansible/tmp/ansible-tmp-1457046096.64-209878160685501/file&quot;, line 409, in main
    open(path, 'w').close()
IOError: [Errno 2] No such file or directory: '/root/ansible_testing/ansible_test_file'

fatal: [testhost]: FAILED! =&gt; {&quot;changed&quot;: false, &quot;failed&quot;: true, &quot;invocation&quot;: {&quot;module_name&quot;: &quot;file&quot;}, &quot;parsed&quot;: false}

NO MORE HOSTS LEFT *************************************************************
    to retry, use: --limit @bad_parsing.retry

PLAY RECAP *********************************************************************
testhost                   : ok=1    changed=0    unreachable=0    failed=1

make: *** [parsing] Error 2"><pre class="notranslate"><code class="notranslate">TASK [test_bad_parsing : file] *************************************************
task path: /opt/ansible/ansible/test/integration/roles/test_bad_parsing/tasks/main.yml:29
ESTABLISH LOCAL CONNECTION FOR USER: root
127.0.0.1 EXEC /bin/sh -c '( umask 22 &amp;&amp; mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1457046096.64-209878160685501 `" &amp;&amp; echo "` echo $HOME/.ansible/tmp/ansible-tmp-1457046096.64-209878160685501 `" )'
127.0.0.1 PUT /tmp/tmpXbN09c TO /root/.ansible/tmp/ansible-tmp-1457046096.64-209878160685501/file
127.0.0.1 EXEC /bin/sh -c 'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1457046096.64-209878160685501/file; rm -rf "/root/.ansible/tmp/ansible-tmp-1457046096.64-209878160685501/" &gt; /dev/null 2&gt;&amp;1'
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
  File "/root/.ansible/tmp/ansible-tmp-1457046096.64-209878160685501/file", line 2491, in &lt;module&gt;
    main()
  File "/root/.ansible/tmp/ansible-tmp-1457046096.64-209878160685501/file", line 409, in main
    open(path, 'w').close()
IOError: [Errno 2] No such file or directory: '/root/ansible_testing/ansible_test_file'

fatal: [testhost]: FAILED! =&gt; {"changed": false, "failed": true, "invocation": {"module_name": "file"}, "parsed": false}

NO MORE HOSTS LEFT *************************************************************
    to retry, use: --limit @bad_parsing.retry

PLAY RECAP *********************************************************************
testhost                   : ok=1    changed=0    unreachable=0    failed=1

make: *** [parsing] Error 2
</code></pre></div>