current_resource attribute matching should also depend on container_name #51
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When attempting to execute action :run on multiple containers, the first docker will run successfully, and subsequent attempts will not perform any action (assuming the first docker started successfully); alternatively the subsequent attempts could also try to start the container if it failed to start originally.
This pull request will make it such that if container_name is defined, current_resource will also match on the container_name when determining container_id, and other attributes. If container_name is omitted, the provider will behave in the same fashion as before. My stack requires the execution of several :run actions with the same image / command / command line params but different container_names; I tested my recipe using this modified provider to ensure each container started successfully. I don't believe this should modify any other actions, although I have not fully tested this assumption.