Skip to content
This repository was archived by the owner on Aug 21, 2022. It is now read-only.

Commit b243cf6

Browse files
committed
fix: remove after_setup and before_destroy hook execution
1 parent d61c10e commit b243cf6

3 files changed

Lines changed: 1 addition & 10 deletions

File tree

tasks/steps/destroy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
with_items: "{{ app_config.container.services }}"
66
loop_control:
77
loop_var: outer_item
8-
when: item.hooks is defined and item.hooks.before_destroy is defined
8+
when: item.hooks is defined and item.hooks.execute_before_destroy is defined

tasks/steps/sub/execute-destroy-hook.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
---
2-
- raw: "docker exec stackhead-{{ project_name }}-{{ outer_item.name }} {{ item|getstackhead.stackhead.TFescapeDoubleQuotes }}"
3-
with_items: "{{ outer_item.hooks.before_destroy|default([]) }}"
42
- find:
53
path: "{{ stackhead__containerhooks_location }}"
64
patterns: "beforeDestroy_*"

templates/terraform/docker.tf.j2

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ resource "docker_container" "stackhead-{{ project_name }}-{{ service.name }}" {
2222
command = "docker cp -a {{ stackhead__containerhooks_location }}/afterSetup_{{ service.hooks.execute_after_setup|basename }} stackhead-{{ project_name }}-{{ service.name }}:/afterSetup_{{ service.hooks.execute_after_setup|basename }} && docker exec stackhead-{{ project_name }}-{{ service.name }} sh /afterSetup_{{ service.hooks.execute_after_setup|basename }}"
2323
}
2424
{% endif %}
25-
{% if service.hooks.after_setup is defined %}
26-
{% for hook in service.hooks.after_setup %}
27-
provisioner "local-exec" {
28-
command = "docker exec stackhead-{{ project_name }}-{{ service.name }} {{ hook|getstackhead.stackhead.TFescapeDoubleQuotes }}"
29-
}
30-
{% endfor %}
31-
{% endif %}
3225
{% endif %}
3326

3427
networks_advanced {

0 commit comments

Comments
 (0)