Ansible how to push local image to private registry
<p>I have a private registry on my server.</p>

<p>After which, I tried tag image and push it by ansible.</p>

<pre><code>- name: Tag to repository to a private registry and push it
  docker_image:
    name: dwf/test_sample
    repository: registry.dwf.com/dwf/test_sample
    state: present
</code></pre>

<p>Image <code>dwf/test_sample</code> is local image on my laptop. But it tries pull from DockerHub :|, and I received this error:</p>

<pre><code>"msg": "Error pulling dwf/test_sample - code: None message: Error: image dwf/test_sample not found"}
</code></pre>

<p>How to use local image or disable <code>pull</code> when <code>tag</code> and <code>push</code> image ?</p>

<p>Pls suggest a specific solution. Thank you !</p>