From 4e5b055d02f7ab1f618fb2426cfff9ebc1c9678a Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sun, 25 Feb 2018 23:37:04 +0100 Subject: A complete working ADEI templte, v1-alpha --- roles/ands_kaas/tasks/search.yml | 2 +- roles/ands_kaas/templates/50-kaas-pods.yml.j2 | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'roles/ands_kaas') diff --git a/roles/ands_kaas/tasks/search.yml b/roles/ands_kaas/tasks/search.yml index e54c42b..9844ee8 100644 --- a/roles/ands_kaas/tasks/search.yml +++ b/roles/ands_kaas/tasks/search.yml @@ -12,5 +12,5 @@ local_path: "{{ osv_path }}" remote_path: "{{ hostvars[inventory_hostname][pvar] }}" when: - - osv in kaas_openshift_volumes + - osv in (kaas_project_config.volumes | default(kaas_openshift_volumes)) - hostvars[inventory_hostname][pvar] is defined diff --git a/roles/ands_kaas/templates/50-kaas-pods.yml.j2 b/roles/ands_kaas/templates/50-kaas-pods.yml.j2 index 49dab3f..9782f75 100644 --- a/roles/ands_kaas/templates/50-kaas-pods.yml.j2 +++ b/roles/ands_kaas/templates/50-kaas-pods.yml.j2 @@ -183,8 +183,9 @@ objects: {{ type }}: timeoutSeconds: {{ probe.timeout | default(1) }} initialDelaySeconds: {{ probe.delay | default(10) }} - {% if (probe.cmd is defined) %} - command: "{{ probe.cmd }}" + {% if (probe.command is defined) %} + exec: + command: {{ probe.command | to_json }} {% elif (probe.path is defined) %} httpGet: path: {{ probe.path }} @@ -196,5 +197,13 @@ objects: {% endfor %} {% endfor %} {% endif %} + {% if img.hooks is defined %} + lifecycle: + {% for hook in img.hooks %} + {{ hook.type }}: + exec: + command: {{ hook.command | to_json }} + {% endfor %} + {% endif %} {% endfor %} {% endfor %} -- cgit v1.2.3