Merge pull request #2521 from wrouesnel/docker_reloaded_fixes
docker: Fix state=reloaded to detect default LoggingDriver for docker
This commit is contained in:
commit
9d4403f2b3
1 changed files with 2 additions and 1 deletions
|
@ -1084,6 +1084,7 @@ class DockerManager(object):
|
||||||
|
|
||||||
running = self.get_running_containers()
|
running = self.get_running_containers()
|
||||||
current = self.get_inspect_containers(running)
|
current = self.get_inspect_containers(running)
|
||||||
|
defaults = self.client.info()
|
||||||
|
|
||||||
#Get API version
|
#Get API version
|
||||||
api_version = self.client.version()['ApiVersion']
|
api_version = self.client.version()['ApiVersion']
|
||||||
|
@ -1411,7 +1412,7 @@ class DockerManager(object):
|
||||||
# LOG_DRIVER
|
# LOG_DRIVER
|
||||||
|
|
||||||
if self.ensure_capability('log_driver', False):
|
if self.ensure_capability('log_driver', False):
|
||||||
expected_log_driver = self.module.params.get('log_driver') or 'json-file'
|
expected_log_driver = self.module.params.get('log_driver') or defaults['LoggingDriver']
|
||||||
actual_log_driver = container['HostConfig']['LogConfig']['Type']
|
actual_log_driver = container['HostConfig']['LogConfig']['Type']
|
||||||
if actual_log_driver != expected_log_driver:
|
if actual_log_driver != expected_log_driver:
|
||||||
self.reload_reasons.append('log_driver ({0} => {1})'.format(actual_log_driver, expected_log_driver))
|
self.reload_reasons.append('log_driver ({0} => {1})'.format(actual_log_driver, expected_log_driver))
|
||||||
|
|
Loading…
Reference in a new issue