mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
Improve tagging examples. (#50321)
This commit is contained in:
parent
a1dfce3aa1
commit
04e2a94687
1 changed files with 9 additions and 3 deletions
|
@ -204,18 +204,24 @@ EXAMPLES = '''
|
||||||
|
|
||||||
- name: Tag and push to docker hub
|
- name: Tag and push to docker hub
|
||||||
docker_image:
|
docker_image:
|
||||||
name: pacur/centos-7
|
name: pacur/centos-7:56
|
||||||
repository: dcoppenhagan/myimage
|
repository: dcoppenhagan/myimage:7.56
|
||||||
tag: 7.0
|
|
||||||
push: yes
|
push: yes
|
||||||
|
|
||||||
- name: Tag and push to local registry
|
- name: Tag and push to local registry
|
||||||
docker_image:
|
docker_image:
|
||||||
|
# Image will be centos:7
|
||||||
name: centos
|
name: centos
|
||||||
|
# Will be pushed to localhost:5000/centos:7
|
||||||
repository: localhost:5000/centos
|
repository: localhost:5000/centos
|
||||||
tag: 7
|
tag: 7
|
||||||
push: yes
|
push: yes
|
||||||
|
|
||||||
|
- name: Add tag latest to image
|
||||||
|
docker_image:
|
||||||
|
name: myimage:7.1.2
|
||||||
|
repository: myimage:latest
|
||||||
|
|
||||||
- name: Remove image
|
- name: Remove image
|
||||||
docker_image:
|
docker_image:
|
||||||
state: absent
|
state: absent
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue