<p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/yamatt/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/yamatt">@yamatt</a> on October 31, 2016 21:15</em></p>

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

<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>

<p dir="auto"><code class="notranslate">docker_container</code></p>
<h5 dir="auto">ANSIBLE VERSION</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.1.2.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.1.2.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>

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

<p dir="auto">Linux/Fedora 22</p>
<h5 dir="auto">SUMMARY</h5>

<p dir="auto">When running a task with an <code class="notranslate">entrypoint</code> parameter, a docker container is destroyed and recreated each time after the first time it is run.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>


<p dir="auto">Fill in the variables and run this twice:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Create data container
  docker_container:
    name: &quot;{{ docker_data_name }}&quot;
    image: &quot;{{ image }}&quot;
    state: present
    entrypoint: &quot;/bin/echo Data-only container for {{ name }}&quot;"><pre class="notranslate"><code class="notranslate">- name: Create data container
  docker_container:
    name: "{{ docker_data_name }}"
    image: "{{ image }}"
    state: present
    entrypoint: "/bin/echo Data-only container for {{ name }}"
</code></pre></div>
<p dir="auto">On the second run this roduces:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [docker-image : Create data container] ************************************
changed: [hostname]"><pre class="notranslate"><code class="notranslate">TASK [docker-image : Create data container] ************************************
changed: [hostname]
</code></pre></div>
<p dir="auto">Destroy that container, comment out the entrypoint, then run this twice</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Create data container
  docker_container:
    name: &quot;{{ docker_data_name }}&quot;
    image: &quot;{{ image }}&quot;
    state: present
    #entrypoint: &quot;/bin/echo Data-only container for {{ name }}&quot;"><pre class="notranslate"><code class="notranslate">- name: Create data container
  docker_container:
    name: "{{ docker_data_name }}"
    image: "{{ image }}"
    state: present
    #entrypoint: "/bin/echo Data-only container for {{ name }}"
</code></pre></div>
<p dir="auto">On the second run this poduces:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [docker-image : Create data container] ************************************
ok: [hostname]"><pre class="notranslate"><code class="notranslate">TASK [docker-image : Create data container] ************************************
ok: [hostname]
</code></pre></div>

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

<p dir="auto">Ansible reports no change. The created timestamp should be the same as the first time it was run.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>

<p dir="auto">Ansible reports a change, and the created timestamp becomes recent.</p>
<p dir="auto"><em>Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="186399750" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible-modules-core/issues/5446" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible-modules-core/issues/5446/hovercard" href="https://github.com/ansible/ansible-modules-core/issues/5446">ansible/ansible-modules-core#5446</a></em></p>
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">win_firewall_rule</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2.2.1.0"><pre class="notranslate"><code class="notranslate">2.2.1.0
</code></pre></div>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Windows Server 2012</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">When the rule already exists, win_firewall_rule fails to verify that isn't changed because of <code class="notranslate">netsh</code> output in English. My host is using German language and then <code class="notranslate">netsh</code> output is different.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">Try to execute the following task twice on a non-English host:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- name: Firewall rule to allow smtp on TCP port 25
  action: win_firewall_rule
  args:
      name: smtp
      enable: yes
      state: present
      localport: 25
      action: allow
      direction: In
      protocol: TCP"><pre class="notranslate">- <span class="pl-ent">name</span>: <span class="pl-s">Firewall rule to allow smtp on TCP port 25</span>
  <span class="pl-ent">action</span>: <span class="pl-s">win_firewall_rule</span>
  <span class="pl-ent">args</span>:
      <span class="pl-ent">name</span>: <span class="pl-s">smtp</span>
      <span class="pl-ent">enable</span>: <span class="pl-s">yes</span>
      <span class="pl-ent">state</span>: <span class="pl-s">present</span>
      <span class="pl-ent">localport</span>: <span class="pl-c1">25</span>
      <span class="pl-ent">action</span>: <span class="pl-s">allow</span>
      <span class="pl-ent">direction</span>: <span class="pl-s">In</span>
      <span class="pl-ent">protocol</span>: <span class="pl-s">TCP</span></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">The task doesn't fail.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">The task fails.</p>