Skip to content

Commit

Permalink
Add mac_address field to podman_container module
Browse files Browse the repository at this point in the history
* extended description of podman_container
* add mac_address field and add_param function in podman_container_lib
* closes #146
  • Loading branch information
ericzolf authored and sshnaidm committed Nov 23, 2020
1 parent baf459e commit 29a4bfa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/module_utils/podman/podman_container_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
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'),
Expand Down Expand Up @@ -391,6 +392,9 @@ def addparam_log_opt(self, c):
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']]

Expand Down
6 changes: 6 additions & 0 deletions plugins/modules/podman_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,12 @@
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)
Expand Down

0 comments on commit 29a4bfa

Please sign in to comment.