From 3c461e84c66967e6f5f87968b16ea46f40b7e820 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= <tseeker@nocternity.net>
Date: Fri, 7 Oct 2022 16:51:14 +0200
Subject: [PATCH] Fixed type check

---
 inventory_plugins/reconstructed.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/inventory_plugins/reconstructed.py b/inventory_plugins/reconstructed.py
index 6fff8a8..30bcfa0 100644
--- a/inventory_plugins/reconstructed.py
+++ b/inventory_plugins/reconstructed.py
@@ -633,7 +633,7 @@ class RcInstruction(abc.ABC):
         if may_be_template:
             self._templar.available_variables = variables
             real_name = self._templar.template(name)
-            if not isinstance(name, string_types):
+            if not isinstance(real_name, string_types):
                 raise AnsibleRuntimeError(
                     "%s: '%s' did not coalesce into a string" % (self._action, name)
                 )