From 2db0a7eb7ddde36cce3d85082d4f79469efa7cac Mon Sep 17 00:00:00 2001 From: Kate Case Date: Fri, 20 Sep 2024 15:07:59 -0400 Subject: [PATCH] Missed another filter --- src/ansible_creator/utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ansible_creator/utils.py b/src/ansible_creator/utils.py index 6b888340..96dd04b3 100644 --- a/src/ansible_creator/utils.py +++ b/src/ansible_creator/utils.py @@ -12,7 +12,7 @@ import yaml -from ansible_creator.constants import SKIP_DIRS +from ansible_creator.constants import SKIP_DIRS, SKIP_FILES_TYPES if TYPE_CHECKING: @@ -248,6 +248,11 @@ def each_obj( *self._recursive_walk(root=obj, resource=resource, template_data=template_data), ] + if dest_path.is_file() and ( + obj.name.split(".")[-1] in SKIP_FILES_TYPES or obj.name == "__meta__.yml" + ): + return [] + return [dest_path] def _per_container(self, resource: str) -> list[DestinationFile]: