Default net to 'bridge' in container diff

This prevents an unnecessary reload when the `net` parameter is unspecified
(i.e. almost always).
pull/18777/head
Ash Wilson 10 years ago committed by Matt Clay
parent 9b3aa0a9d4
commit 9f12fd0a26

@ -1115,8 +1115,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)

Loading…
Cancel
Save