@ -1854,6 +1854,9 @@ class Container(DockerBaseClass):
differences = DifferenceTracker ( )
differences = DifferenceTracker ( )
for key , value in config_mapping . items ( ) :
for key , value in config_mapping . items ( ) :
minimal_version = self . parameters . client . option_minimal_versions . get ( key , { } )
if not minimal_version . get ( ' supported ' , True ) :
continue
compare = self . parameters . client . comparisons [ self . parameters_map . get ( key , key ) ]
compare = self . parameters . client . comparisons [ self . parameters_map . get ( key , key ) ]
self . log ( ' check differences %s %s vs %s ( %s ) ' % ( key , getattr ( self . parameters , key ) , str ( value ) , compare ) )
self . log ( ' check differences %s %s vs %s ( %s ) ' % ( key , getattr ( self . parameters , key ) , str ( value ) , compare ) )
if getattr ( self . parameters , key , None ) is not None :
if getattr ( self . parameters , key , None ) is not None :
@ -2290,7 +2293,7 @@ class ContainerManager(DockerBaseClass):
if image_different :
if image_different :
self . diff [ ' image_different ' ] = True
self . diff [ ' image_different ' ] = True
self . log ( " differences " )
self . log ( " differences " )
self . log ( differences , pretty_print = True )
self . log ( differences . get_legacy_docker_container_diffs ( ) , pretty_print = True )
image_to_use = self . parameters . image
image_to_use = self . parameters . image
if not image_to_use and container and container . Image :
if not image_to_use and container and container . Image :
image_to_use = container . Image
image_to_use = container . Image
@ -2740,7 +2743,7 @@ class AnsibleDockerClientContainer(AnsibleDockerClient):
# Helper function to detect whether any specified network uses ipv4_address or ipv6_address
# Helper function to detect whether any specified network uses ipv4_address or ipv6_address
def detect_ipvX_address_usage ( ) :
def detect_ipvX_address_usage ( ) :
for network in self . module . params . get ( " networks " ) or [ ] :
for network in self . module . params . get ( " networks " ) or [ ] :
if ' ipv4_address ' in network or ' ipv6_address ' in network :
if network . get ( ' ipv4_address ' ) is not None or network . get ( ' ipv6_address ' ) is not None :
return True
return True
return False
return False