<p dir="auto">From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/wangjild/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/wangjild">@wangjild</a> on 2016-10-18T08:58: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">git</p>
<h5 dir="auto">ANSIBLE VERSION</h5>

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

<h5 dir="auto">OS / ENVIRONMENT</h5>

<p dir="auto">debian:8.0 jessie</p>
<h5 dir="auto">SUMMARY</h5>

<p dir="auto">If local git repository has modification, an update attempt of always fails with Local modifications exist, even if force=yes was given.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>


<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  tasks:
    - name: update project dependency
      git: dest={{item.location|quote}} repo={{item.scm_url|quote}} version={{item.scm_revision|quote}} force=yes refspec={{item.scm_refspec}} accept_hostkey=yes
      with_items: &quot;{{ deps }}&quot;"><pre class="notranslate"><code class="notranslate">  tasks:
    - name: update project dependency
      git: dest={{item.location|quote}} repo={{item.scm_url|quote}} version={{item.scm_revision|quote}} force=yes refspec={{item.scm_refspec}} accept_hostkey=yes
      with_items: "{{ deps }}"
</code></pre></div>

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

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


<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="failed: [127.0.0.1] =&gt; {
    &quot;failed&quot;: true,
    &quot;invocation&quot;: {
        &quot;module_name&quot;: &quot;git&quot;
    },
    &quot;item&quot;: {
        &quot;location&quot;: &quot;/opt/tiger/neihan/conf&quot;,
        &quot;name&quot;: &quot;neihan/conf&quot;,
        &quot;scm_refspec&quot;: &quot;refs/heads/master&quot;,
        &quot;scm_revision&quot;: &quot;master&quot;,
        &quot;scm_url&quot;: &quot;ssh://*********/neihan/conf&quot;
    },
    &quot;module_stderr&quot;: &quot;Shared connection to 127.0.0.1 closed.\r\n&quot;,
    &quot;module_stdout&quot;: &quot;Traceback (most recent call last):\r\n  File \&quot;/tmp/ansible_U00Fwd/ansible_module_git.py\&quot;, line 1023, in &lt;module&gt;\r\n    main()\r\n  File \&quot;/tmp/ansible_U00Fwd/ansible_module_git.py\&quot;, line 974, in main\r\n    result.update(changed=True, after=remote_head, msg='Local modifications exist')\r\nUnboundLocalError: local variable 'remote_head' referenced before assignment\r\n&quot;,
    &quot;msg&quot;: &quot;MODULE FAILURE&quot;
}"><pre class="notranslate"><code class="notranslate">failed: [127.0.0.1] =&gt; {
    "failed": true,
    "invocation": {
        "module_name": "git"
    },
    "item": {
        "location": "/opt/tiger/neihan/conf",
        "name": "neihan/conf",
        "scm_refspec": "refs/heads/master",
        "scm_revision": "master",
        "scm_url": "ssh://*********/neihan/conf"
    },
    "module_stderr": "Shared connection to 127.0.0.1 closed.\r\n",
    "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_U00Fwd/ansible_module_git.py\", line 1023, in &lt;module&gt;\r\n    main()\r\n  File \"/tmp/ansible_U00Fwd/ansible_module_git.py\", line 974, in main\r\n    result.update(changed=True, after=remote_head, msg='Local modifications exist')\r\nUnboundLocalError: local variable 'remote_head' referenced before assignment\r\n",
    "msg": "MODULE FAILURE"
}
</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="183627514" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible-modules-core/issues/5292" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible-modules-core/issues/5292/hovercard" href="https://github.com/ansible/ansible-modules-core/issues/5292">ansible/ansible-modules-core#5292</a></p>
<h5 dir="auto">ISSUE TYPE</h5>

<ul dir="auto">
<li>Documentation Report</li>
</ul>
<h5 dir="auto">SUMMARY</h5>

<p dir="auto">The <a href="https://github.com/ansible/ansible/blob/devel/CHANGELOG.md#167-and-the-cradle-will-rock---jul-21-2014">1.6.7 release</a> mentions <a title="CVE-2014-4967" data-hovercard-type="advisory" data-hovercard-url="/advisories/GHSA-64cw-m57j-65xj/hovercard" href="https://github.com/advisories/GHSA-64cw-m57j-65xj">CVE-2014-4967</a> and <a title="CVE-2014-4966" data-hovercard-type="advisory" data-hovercard-url="/advisories/GHSA-wqq5-c89p-3wc3/hovercard" href="https://github.com/advisories/GHSA-wqq5-c89p-3wc3">CVE-2014-4966</a>.</p>
<p dir="auto">Both of them are still in the <code class="notranslate">**RESERVED**</code> state:</p>
<ul dir="auto">
<li><a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-4966" rel="nofollow">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-4966</a></li>
<li><a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-4967" rel="nofollow">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-4967</a></li>
</ul>
<p dir="auto">Any reason for not setting them free after all these years? :)</p>