pyinfra-dev / pyinfra

pyinfra turns Python code into shell commands and runs them on your servers. Execute ad-hoc commands and write declarative operations. Target SSH servers, local machine and Docker containers. Fast and scales from one server to thousands.
https://pyinfra.com
MIT License
3.85k stars 374 forks source link

iptables ignores "destination=" and "not_destination" arguments #1016

Closed SebastianApel closed 6 months ago

SebastianApel commented 1 year ago

Describe the bug

iptables ignores "destination=" and "not_destination" arguments when execution the operation.

To Reproduce

iptables.rule(chain="FORWARD", jump="ACCEPT", destination="192.168.1.100")

Expected behavior

Honor the "destination=" and "not_destination" arguments

Meta

The code in pyinfra/operation/iptables.py, line 266+ does not contain any instructions to honor the "destination" / "not_destination" arguments.

pls see https://github.com/Fizzadar/pyinfra/blob/5e87a0e3e71d58a9df906337e096e00681ecc371/pyinfra/operations/iptables.py#L266

Fizzadar commented 6 months ago

Finally fixed this in https://github.com/pyinfra-dev/pyinfra/commit/e5206e4f178acc7d9519a3794ab42211c7308d64, released in v2.9.1 just now.