diff --git a/plugins/module_utils/podman/podman_container_lib.py b/plugins/module_utils/podman/podman_container_lib.py index fedf405..21b8f4f 100644 --- a/plugins/module_utils/podman/podman_container_lib.py +++ b/plugins/module_utils/podman/podman_container_lib.py @@ -78,6 +78,7 @@ ARGUMENTS_SPEC_CONTAINER = dict( type='str', choices=["debug", "info", "warn", "error", "fatal", "panic"]), log_opt=dict(type='str', aliases=['log_options']), + mac_address=dict(type='str'), memory=dict(type='str'), memory_reservation=dict(type='str'), memory_swap=dict(type='str'), @@ -391,6 +392,9 @@ class PodmanModuleParams: def addparam_log_level(self, c): return c + ['--log-level', self.params['log_level']] + def addparam_mac_address(self, c): + return c + ['--mac-address', self.params['mac_address']] + def addparam_memory(self, c): return c + ['--memory', self.params['memory']] diff --git a/plugins/modules/podman_container.py b/plugins/modules/podman_container.py index 4310f44..593e49c 100644 --- a/plugins/modules/podman_container.py +++ b/plugins/modules/podman_container.py @@ -426,6 +426,12 @@ options: type: str aliases: - log_options + mac_address: + description: + - Specify a MAC address for the container, for example + '92:d0:c6:0a:29:33'. + Don't forget that it must be unique within one Ethernet network. + type: str memory: description: - Memory limit (format 10k, where unit = b, k, m or g)