1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

use Config MacAddress by default instead of Networks (#564)

* use Config MacAddress by default instead of Networks

* use Config MacAddress by default instead of Networks - fix typo

* #564 docker_container macaddress - add changelog fragment
This commit is contained in:
Kirill Petrov 2020-06-30 06:40:43 +03:00 committed by GitHub
parent a7a74a6eb7
commit 706195fb02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- docker_container - use Config MacAddress by default instead of Networks. Networks MacAddress is empty in some cases (https://github.com/ansible/ansible/issues/70206).

View file

@ -2121,7 +2121,7 @@ class Container(DockerBaseClass):
ipc_mode=host_config.get("IpcMode"),
labels=config.get('Labels'),
expected_links=host_config.get('Links'),
mac_address=network.get('MacAddress'),
mac_address=config.get('MacAddress', network.get('MacAddress')),
memory_swappiness=host_config.get('MemorySwappiness'),
network_mode=host_config.get('NetworkMode'),
userns_mode=host_config.get('UsernsMode'),