@ -468,8 +468,9 @@ options:
resolve_image :
resolve_image :
description :
description :
- If the current image digest should be resolved from registry and updated if changed .
- If the current image digest should be resolved from registry and updated if changed .
- Requires API version > = 1.30 .
type : bool
type : bool
default : yes
default : no
version_added : 2.8
version_added : 2.8
restart_config :
restart_config :
description :
description :
@ -2266,12 +2267,10 @@ class DockerServiceManager(object):
def remove_service ( self , name ) :
def remove_service ( self , name ) :
self . client . remove_service ( name )
self . client . remove_service ( name )
def get_image_digest ( self , name , resolve = Tru e) :
def get_image_digest ( self , name , resolve = Fals e) :
if (
if (
not name
not name
or not resolve
or not resolve
or self . client . docker_py_version < LooseVersion ( ' 3.2 ' )
or self . client . docker_api_version < LooseVersion ( ' 1.30 ' )
) :
) :
return name
return name
repo , tag = parse_repository_tag ( name )
repo , tag = parse_repository_tag ( name )
@ -2543,7 +2542,7 @@ def main():
) ) ,
) ) ,
reserve_cpu = dict ( type = ' float ' , removed_in_version = ' 2.12 ' ) ,
reserve_cpu = dict ( type = ' float ' , removed_in_version = ' 2.12 ' ) ,
reserve_memory = dict ( type = ' str ' , removed_in_version = ' 2.12 ' ) ,
reserve_memory = dict ( type = ' str ' , removed_in_version = ' 2.12 ' ) ,
resolve_image = dict ( type = ' bool ' , default = Tru e) ,
resolve_image = dict ( type = ' bool ' , default = Fals e) ,
restart_config = dict ( type = ' dict ' , options = dict (
restart_config = dict ( type = ' dict ' , options = dict (
condition = dict ( type = ' str ' , choices = [ ' none ' , ' on-failure ' , ' any ' ] ) ,
condition = dict ( type = ' str ' , choices = [ ' none ' , ' on-failure ' , ' any ' ] ) ,
delay = dict ( type = ' str ' ) ,
delay = dict ( type = ' str ' ) ,
@ -2618,6 +2617,7 @@ def main():
stop_signal = dict ( docker_py_version = ' 2.6.0 ' , docker_api_version = ' 1.28 ' ) ,
stop_signal = dict ( docker_py_version = ' 2.6.0 ' , docker_api_version = ' 1.28 ' ) ,
publish = dict ( docker_py_version = ' 3.0.0 ' , docker_api_version = ' 1.25 ' ) ,
publish = dict ( docker_py_version = ' 3.0.0 ' , docker_api_version = ' 1.25 ' ) ,
read_only = dict ( docker_py_version = ' 2.6.0 ' , docker_api_version = ' 1.28 ' ) ,
read_only = dict ( docker_py_version = ' 2.6.0 ' , docker_api_version = ' 1.28 ' ) ,
resolve_image = dict ( docker_api_version = ' 1.30 ' , docker_py_version = ' 3.2.0 ' ) ,
rollback_config = dict ( docker_py_version = ' 3.5.0 ' , docker_api_version = ' 1.28 ' ) ,
rollback_config = dict ( docker_py_version = ' 3.5.0 ' , docker_api_version = ' 1.28 ' ) ,
# specials
# specials
publish_mode = dict (
publish_mode = dict (
@ -2690,7 +2690,6 @@ def main():
usage_msg = ' set rollback_config.order '
usage_msg = ' set rollback_config.order '
) ,
) ,
)
)
required_if = [
required_if = [
( ' state ' , ' present ' , [ ' image ' ] )
( ' state ' , ' present ' , [ ' image ' ] )
]
]