ansible/test/units/modules/system
Hans Jerry Illikainen a0b8b85fa5 ufw: add support for interface_in and interface_out (#65382)
* ufw: escalate privileges in integration tests

A few of the integration tests for the UFW module forgot to `become`.
This is problematic if the test suite is executed as a non-privileged
user.  This commit amends that by adding `become` when appropriate.

* ufw: add unit tests for direction and interface

Extend the unit tests for the UFW module to test the `direction` and
`interface` parameters.  This will help in the implementation of a fix
for issue #63903.

* ufw: add support for interface_in and interface_out

The UFW module has support for specifying `direction` and `interface`
for UFW rules.  Rules with these parameters are built such that
per-interface filtering only apply to a single direction based on the
value of `direction`.

Not being able to specify multiple interfaces complicates things for
`routed` rules where one might want to apply filtering only for a
specific combination of `in` and `out` interfaces.

This commit introduces two new parameters to the UFW module:
`interface_in` and `interface_out`.  These rules are mutually exclusive
with the old `direction` and `interface` parameter because of the
ambiguity of having e.g.:

    direction: XXX
    interface: foo
    interface_XXX: bar

Fixes #63903
2019-12-02 08:01:44 +01:00
..
interfaces_file
__init__.py
test_iptables.py iptables: support wait parameter (#47877) 2019-10-19 22:27:45 +05:30
test_java_keystore.py java_keystore - Prefer SHA256 and solve SHA256 keytool in java11 version (#57302) 2019-07-15 12:44:30 -04:00
test_known_hosts.py
test_linux_mountinfo.py
test_pamd.py
test_parted.py
test_systemd.py Unit tests: remove unused imports (#59740) 2019-07-29 22:10:13 +02:00
test_ufw.py ufw: add support for interface_in and interface_out (#65382) 2019-12-02 08:01:44 +01:00