diff --git a/changelogs/fragments/51059-dnf-support-substitutions b/changelogs/fragments/51059-dnf-support-substitutions new file mode 100644 index 00000000000..bc862913fb5 --- /dev/null +++ b/changelogs/fragments/51059-dnf-support-substitutions @@ -0,0 +1,3 @@ +minor_changes: + - dnf module now supports loading substitution overrides from the installroot + diff --git a/lib/ansible/modules/packaging/os/dnf.py b/lib/ansible/modules/packaging/os/dnf.py index a4bfacbb810..3d91bc7ab15 100644 --- a/lib/ansible/modules/packaging/os/dnf.py +++ b/lib/ansible/modules/packaging/os/dnf.py @@ -530,6 +530,9 @@ class DnfModule(YumDnf): # Set installroot conf.installroot = installroot + # Load substitutions from the filesystem + conf.substitutions.update_from_etc(installroot) + # Handle different DNF versions immutable mutable datatypes and # dnf v1/v2/v3 #