From 61ed229732042c187d9e378fa5f7e3b986d66654 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Tue, 29 Jan 2019 14:10:53 -0600 Subject: [PATCH] dnf load substitutions from installroot (#51206) Fixes #51059 Signed-off-by: Adam Miller --- changelogs/fragments/51059-dnf-support-substitutions | 3 +++ lib/ansible/modules/packaging/os/dnf.py | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 changelogs/fragments/51059-dnf-support-substitutions diff --git a/changelogs/fragments/51059-dnf-support-substitutions b/changelogs/fragments/51059-dnf-support-substitutions new file mode 100644 index 0000000000..bc862913fb --- /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 a4bfacbb81..3d91bc7ab1 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 #