Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker_image: allow to tag images by name, improve docs #149

Merged

Conversation

felixfontein
Copy link
Collaborator

@felixfontein felixfontein commented Jun 4, 2021

SUMMARY

Fixes #147.

Also adds explicit tests which tag a docker image by ID.

ISSUE TYPE
  • Docs Pull Request
  • Feature Pull Request
COMPONENT NAME

docker_image

format I(repository:tag). If no tag is provided, will use the value of the C(tag) parameter or I(latest).
- Use with state C(present) to tag the image.
- Expects format C(repository:tag). If no tag is provided, will use the value of the I(tag) parameter or C(latest).
- If I(push=true), I(repository) must either include a registry, or will be assumed to belong to the default
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may misunderstood what you have meant by including a registry though.

Suggested change
- If I(push=true), I(repository) must either include a registry, or will be assumed to belong to the default
- If I(push=true), I(repository) must either be a registry, or will be assumed to belong to the default

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A registry is "your.registry.com:5000", a name including a registry is "your.registry.com:5000/repo/image". I mean the latter here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sure, thanks for clarification.

@felixfontein felixfontein changed the title Improve docker_image docs [WIP] Improve docker_image docs Jun 4, 2021
@felixfontein felixfontein changed the title [WIP] Improve docker_image docs docker_image: allow to tag images by name, improve docs Jun 5, 2021
@felixfontein
Copy link
Collaborator Author

Ok, this is no longer a docs PR, but a feature + docs PR. It allows to tag images by ID, which didn't work before because it tried to add :tag to the image ID... (Since we didn't document before that it should work, it's a feature and not a bugfix.)

@felixfontein
Copy link
Collaborator Author

ready_for_review

Copy link
Contributor

@briantist briantist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, only small thing is that it looks like you can get rid of the re import now.

plugins/modules/docker_image.py Show resolved Hide resolved
@felixfontein felixfontein merged commit b775bac into ansible-collections:main Jun 7, 2021
@felixfontein
Copy link
Collaborator Author

@aminvakil @briantist thanks a lot for reviewing!

@felixfontein felixfontein deleted the improve-image-docs branch June 7, 2021 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support re-tagging docker image
3 participants