containers / ansible-podman-collections

Repository for Ansible content that can include playbooks, roles, modules, and plugins for use with the Podman tool
GNU General Public License v3.0
252 stars 137 forks source link

Add support for port ranges #751

Closed frnky closed 1 month ago

frnky commented 1 month ago

The commit in this PR implements support for port ranges when using podman_container and podman_pod.

I've run the tests locally with podman 5.0.3 and 4.9.4.

sshnaidm commented 1 month ago

@frnky Thanks for this awesome patch! Although I was just working on whole redesigning of idempotency in the module and it was fixed automatically with new way of difference calculation from CreateCommand. If you would like to contribute more, you can take any issue from what we have. Sorry again for this inconvenience.

frnky commented 1 month ago

Good work on the redesign! It felt odd having to implement a parser for the options that are passed to podman to get the diffing functionality. Reusing the CreateCommand array is definitely the better approach.