Merge pull request #1609 from smashwilson/default-net-bridge

[docker] Prevent unnecessary reloads due to the net parameter
This commit is contained in:
Brian Coca 2015-06-29 23:38:32 -04:00
commit 038cc05f4e

View file

@ -1110,8 +1110,8 @@ class DockerManager(object):
# NETWORK MODE # NETWORK MODE
expected_netmode = self.module.params.get('net') or '' expected_netmode = self.module.params.get('net') or 'bridge'
actual_netmode = container['HostConfig']['NetworkMode'] actual_netmode = container['HostConfig']['NetworkMode'] or 'bridge'
if actual_netmode != expected_netmode: if actual_netmode != expected_netmode:
self.reload_reasons.append('net ({0} => {1})'.format(actual_netmode, expected_netmode)) self.reload_reasons.append('net ({0} => {1})'.format(actual_netmode, expected_netmode))
differing.append(container) differing.append(container)