From bc144cb93b402cfb79a4803bcea93d16b198c7b0 Mon Sep 17 00:00:00 2001 From: kpavic Date: Wed, 13 Jun 2018 14:45:22 +0200 Subject: [PATCH 1/2] Skip yaml files which are not Templates when setting up containers --- playbooks/roles/os_temps/tasks/setup_containers.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/playbooks/roles/os_temps/tasks/setup_containers.yml b/playbooks/roles/os_temps/tasks/setup_containers.yml index 322894ce..f135e32b 100644 --- a/playbooks/roles/os_temps/tasks/setup_containers.yml +++ b/playbooks/roles/os_temps/tasks/setup_containers.yml @@ -10,6 +10,7 @@ find: paths: "{{ os_template_path }}" patterns: '*.yml,*.yaml' + contains: 'kind: Template|kind: \"Template\"' recurse: yes register: os_templates From ffa83592014564150365393cc79481572b7df0c9 Mon Sep 17 00:00:00 2001 From: kpavic Date: Wed, 13 Jun 2018 15:32:44 +0200 Subject: [PATCH 2/2] Improved regex for detecting non-template yaml files --- playbooks/roles/os_temps/tasks/setup_containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/roles/os_temps/tasks/setup_containers.yml b/playbooks/roles/os_temps/tasks/setup_containers.yml index f135e32b..81a34c83 100644 --- a/playbooks/roles/os_temps/tasks/setup_containers.yml +++ b/playbooks/roles/os_temps/tasks/setup_containers.yml @@ -10,7 +10,7 @@ find: paths: "{{ os_template_path }}" patterns: '*.yml,*.yaml' - contains: 'kind: Template|kind: \"Template\"' + contains: 'kind:\s*[\"\'']?Template[\"\'']?' recurse: yes register: os_templates