<p dir="auto">From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/minac/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/minac">@minac</a> on 2016-07-22T15:22:54Z</p>
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">meta</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="enansible 2.1.0.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">enansible 2.1.0.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
</code></pre></div>
<p dir="auto">Ansible installed via pip and not git.</p>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">[defaults]<br>
gathering = explicit<br>
host_key_checking = False<br>
callback_whitelist = profile_tasks<br>
remote_user = ec2-user<br>
private_key_file = /Users/migueldavid/.ssh/aws-vigie.pem<br>
ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}<br>
display_skipped_hosts = False<br>
command_warnings = True<br>
retry_files_enabled = False<br>
squash_actions = apk,apt,dnf,package,pacman,pkgng,yum,zypper</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Mac OS X El Capitan</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">"meta: refresh_inventory" task fails when set as handler with "The module meta was not found in configured module paths"</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">tasks.yml</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Add listener instances to all inventory
  add_host: name={{ item.public_ip }} groups=all
  with_items: 
    - &quot;{{ ec2_listener.instances }}&quot;
  notify: Refresh inventory"><pre class="notranslate"><code class="notranslate">- name: Add listener instances to all inventory
  add_host: name={{ item.public_ip }} groups=all
  with_items: 
    - "{{ ec2_listener.instances }}"
  notify: Refresh inventory
</code></pre></div>
<p dir="auto">handler.yml</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Refresh inventory
  meta: refresh_inventory"><pre class="notranslate"><code class="notranslate">- name: Refresh inventory
  meta: refresh_inventory
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">That the play would refresh the inventory and continue.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="RUNNING HANDLER [myplaybook : Refresh inventory] ************
Friday 22 July 2016  15:57:25 +0100 (0:00:31.448)       0:05:22.537 ***********
fatal: [localhost]: FAILED! =&gt; {&quot;failed&quot;: true, &quot;msg&quot;: &quot;The module meta was not found in configured module paths. Additionally, core modules are missing. If this is a checkout, run 'git submodule update --init --recursive' to correct this problem.&quot;}"><pre class="notranslate"><code class="notranslate">RUNNING HANDLER [myplaybook : Refresh inventory] ************
Friday 22 July 2016  15:57:25 +0100 (0:00:31.448)       0:05:22.537 ***********
fatal: [localhost]: FAILED! =&gt; {"failed": true, "msg": "The module meta was not found in configured module paths. Additionally, core modules are missing. If this is a checkout, run 'git submodule update --init --recursive' to correct this problem."}
</code></pre></div>
<p dir="auto">Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="167069737" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible-modules-core/issues/4240" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible-modules-core/issues/4240/hovercard" href="https://github.com/ansible/ansible-modules-core/issues/4240">ansible/ansible-modules-core#4240</a></p>
<h5 dir="auto">SUMMARY</h5>

<p dir="auto">meta: reset_connection is failing</p>
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>

<p dir="auto">meta</p>
<h5 dir="auto">ANSIBLE VERSION</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2.7.2"><pre lang="paste" class="notranslate"><code class="notranslate">2.7.2
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre lang="paste" class="notranslate"><code class="notranslate">
</code></pre></div>
<h5 dir="auto">OS / ENVIRONMENT</h5>

<p dir="auto">ubuntu 14.04 on controller</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="  handlers:

    - name: Reset
      meta: reset_connection

  tasks:

    - shell: echo &quot;test&quot;
      notify: &quot;Reset&quot;
"><pre class="notranslate">  <span class="pl-ent">handlers</span>:

    - <span class="pl-ent">name</span>: <span class="pl-s">Reset</span>
      <span class="pl-ent">meta</span>: <span class="pl-s">reset_connection</span>

  <span class="pl-ent">tasks</span>:

    - <span class="pl-ent">shell</span>: <span class="pl-s">echo "test"</span>
      <span class="pl-ent">notify</span>: <span class="pl-s"><span class="pl-pds">"</span>Reset<span class="pl-pds">"</span></span>
</pre></div>
<p dir="auto">Note that with a simple task it doesn't output anything:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  tasks:

    - name: Reset
      meta: reset_connection"><pre class="notranslate"><code class="notranslate">  tasks:

    - name: Reset
      meta: reset_connection
</code></pre></div>
<p dir="auto">Nothing is shown</p>

<h5 dir="auto">EXPECTED RESULTS</h5>

<p dir="auto">It should say "success" or "changed"</p>
<h5 dir="auto">ACTUAL RESULTS</h5>

<p dir="auto">It fails. Also not sure it actually reset the connection or not</p>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Result =&gt; &quot;connection closed&quot; but it's a failure (in red) so it can break playbooks when &quot;stop as first error&quot; parameter is set up"><pre lang="paste" class="notranslate"><code class="notranslate">Result =&gt; "connection closed" but it's a failure (in red) so it can break playbooks when "stop as first error" parameter is set up
</code></pre></div>