Default net to 'bridge' in container diff
This prevents an unnecessary reload when the `net` parameter is unspecified (i.e. almost always).
This commit is contained in:
parent
a5bba2488f
commit
29e4a127e1
1 changed files with 2 additions and 2 deletions
|
@ -1108,8 +1108,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…
Reference in a new issue