mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Don't parse/interpret options if state is 'absent'. (#45700)
This commit is contained in:
@@ -753,6 +753,11 @@ class TaskParameters(DockerBaseClass):
|
||||
for key, value in client.module.params.items():
|
||||
setattr(self, key, value)
|
||||
|
||||
# If state is 'absent', parameters do not have to be parsed or interpreted.
|
||||
# Only the container's name is needed.
|
||||
if self.state == 'absent':
|
||||
return
|
||||
|
||||
for param_name in REQUIRES_CONVERSION_TO_BYTES:
|
||||
if client.module.params.get(param_name):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user