From 2a862ee82ef80378ad2d7da2f9b7bdf0ceefb56d Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 7 Aug 2019 22:43:48 +0200 Subject: [PATCH] fix misleading example in docker_image doc (#60207) (#60231) Using docker_image to tag an image as "latest" only updates an existing tag when used with "force_tag: yes" option. As "latest" is present in most cases, the option is added to the example to prevent unexpected behaviour. (cherry picked from commit 5a6003d0edd5b5876e7393b50bece7e46f80c04d) --- lib/ansible/modules/cloud/docker/docker_image.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/modules/cloud/docker/docker_image.py b/lib/ansible/modules/cloud/docker/docker_image.py index 2b53ada54ea..e0e70748909 100644 --- a/lib/ansible/modules/cloud/docker/docker_image.py +++ b/lib/ansible/modules/cloud/docker/docker_image.py @@ -349,6 +349,8 @@ EXAMPLES = ''' docker_image: name: myimage:7.1.2 repository: myimage:latest + # As 'latest' usually already is present, we need to enable overwriting of existing tags: + force_tag: yes source: local - name: Remove image