Skip to content

Commit 6ff5467

Browse files
committed
refactor: ensure that using previous replaced does not remove files and reload unless necessary
The old implemenation of `previous: replaced` would remove all files and reload the firewall every time, even if not necessary - it wasn't technically idempotent, although it would check the new files to see if they matched the old files, and report `changed: false` if nothing actually changed state. The new implementation uses an in-memory backend to apply the changes, then checks if anything changed, and then removes the files and reloads firewall only if something actually changed. Signed-off-by: Rich Megginson <rmeggins@redhat.com>
1 parent d949b33 commit 6ff5467

24 files changed

+3894
-990
lines changed

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -818,23 +818,21 @@ NOTE: `service` - to see how to manage services, see the service section.
818818

819819
### runtime
820820

821-
Enable changes in runtime configuration. If `runtime` parameter is not provided, the default will be set to `True`.
821+
Enable changes in runtime configuration. By default, this is `true` if the
822+
system is booted, or `false` if not booted (i.e. `bootc` system).
822823

823824
```yaml
824-
runtime: true
825+
runtime: false
825826
```
826827

827828
### permanent
828829

829-
Enable changes in permanent configuration. If `permanent` parameter is not provided, the default will be set to `True`.
830+
Enable changes in permanent configuration. By default, this is `true`.
830831

831832
```yaml
832-
permanent: true
833+
permanent: false
833834
```
834835

835-
The permanent and runtime settings are independent, so you can set only the runtime, or only the permanent. You cannot
836-
set both permanent and runtime to `false`.
837-
838836
### previous
839837

840838
If you want to completely wipe out all existing firewall configuration, add

files/get_files_checksums.sh

Lines changed: 0 additions & 75 deletions
This file was deleted.

0 commit comments

Comments
 (0)