diff --git a/ansible/roles/kolla-openstack/action_plugins/kolla_custom_config_info.py b/ansible/roles/kolla-openstack/action_plugins/kolla_custom_config_info.py
index 13b8b26cd9d7a7e65a64aefb3f340810c72a0790..d2ee3b6ae247836b1bf71d945776951fbc1c0861 100644
--- a/ansible/roles/kolla-openstack/action_plugins/kolla_custom_config_info.py
+++ b/ansible/roles/kolla-openstack/action_plugins/kolla_custom_config_info.py
@@ -128,14 +128,14 @@ class ConfigCollector(object):
             if not os.path.exists(dirname):
                 missing_directories.add(dirname)
 
+            sources = map(os.path.realpath, sources)
+            sources = _dedup(sources)
+
             rule = self._find_matching_rule(relative_path, sources)
 
             if not rule:
                 continue
 
-            sources = map(os.path.realpath, sources)
-            sources = _dedup(sources)
-
             if rule["strategy"] == 'copy':
                 copy = {
                     "src": sources[-1],