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_container: improve image finding / change detection #62971
docker_container: improve image finding / change detection #62971
Conversation
The PR fixes that in check mode, a locally non-existant image is not recognized as a change reason. If this happens in non-check mode, the module will try to pull the image, and the module's result will always be (If |
ready_for_review |
force_absent: yes | ||
state: absent | ||
|
||
- name: Create container with alpine image via name (check mode, will pull, same image) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would do this test one more time after create_6 to be sure that changed will be false. And also create_6 after that again (so twice in actual mode for one image), just in case, and also check that changed will be false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not necessary, idempotence for started and created containers is already tested in start-stop.yml
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shipit
@Andersson007 thanks for reviewing this! |
you're always welcome! |
* Improve image finding / change detection. * Checked wrong object. * Improve behavior. (Let docker daemon sort this out.) * Add changelog. * Add simple test. * Fix image name. * Use new docker_image params. * Rewrite. (cherry picked from commit 41eafc2)
* Improve image finding / change detection. * Checked wrong object. * Improve behavior. (Let docker daemon sort this out.) * Add changelog. * Add simple test. * Fix image name. * Use new docker_image params. * Rewrite. (cherry picked from commit 41eafc2)
* Improve image finding / change detection. * Checked wrong object. * Improve behavior. (Let docker daemon sort this out.) * Add changelog. * Add simple test. * Fix image name. * Use new docker_image params. * Rewrite. (cherry picked from commit 41eafc2)
* Improve image finding / change detection. * Checked wrong object. * Improve behavior. (Let docker daemon sort this out.) * Add changelog. * Add simple test. * Fix image name. * Use new docker_image params. * Rewrite. (cherry picked from commit 41eafc2)
SUMMARY
Fixes #62953.
ISSUE TYPE
COMPONENT NAME
docker_container