From b022eb51d758a18309fe1ca198ea7c604aa20fc8 Mon Sep 17 00:00:00 2001 From: Mario Lubenka Date: Sun, 15 Nov 2020 12:50:38 +0100 Subject: [PATCH] feat: use main task from StackHead module API --- __tests__/test-tf-generation.yml | 4 ++-- tasks/{steps => caddy_steps}/generate-caddyfile-tf.yml | 0 tasks/{steps => caddy_steps}/generate-serverconfig-tf.yml | 0 tasks/destroy.yml | 2 -- tasks/main.yml | 2 +- tasks/{ => steps}/deploy.yml | 2 +- tasks/{ => steps}/setup.yml | 2 +- 7 files changed, 5 insertions(+), 7 deletions(-) rename tasks/{steps => caddy_steps}/generate-caddyfile-tf.yml (100%) rename tasks/{steps => caddy_steps}/generate-serverconfig-tf.yml (100%) delete mode 100644 tasks/destroy.yml rename tasks/{ => steps}/deploy.yml (85%) rename tasks/{ => steps}/setup.yml (89%) diff --git a/__tests__/test-tf-generation.yml b/__tests__/test-tf-generation.yml index 0093926..4a6224c 100644 --- a/__tests__/test-tf-generation.yml +++ b/__tests__/test-tf-generation.yml @@ -11,9 +11,9 @@ with_items: "{{ app_config.domains }}" - block: - name: Generate Caddy Terraform file - import_tasks: "../tasks/steps/generate-serverconfig-tf.yml" + import_tasks: "../tasks/caddy_steps/generate-serverconfig-tf.yml" - name: Generate Caddyfile - import_tasks: "../tasks/steps/generate-caddyfile-tf.yml" + import_tasks: "../tasks/caddy_steps/generate-caddyfile-tf.yml" vars: role_path: ".." caddy_root: "." diff --git a/tasks/steps/generate-caddyfile-tf.yml b/tasks/caddy_steps/generate-caddyfile-tf.yml similarity index 100% rename from tasks/steps/generate-caddyfile-tf.yml rename to tasks/caddy_steps/generate-caddyfile-tf.yml diff --git a/tasks/steps/generate-serverconfig-tf.yml b/tasks/caddy_steps/generate-serverconfig-tf.yml similarity index 100% rename from tasks/steps/generate-serverconfig-tf.yml rename to tasks/caddy_steps/generate-serverconfig-tf.yml diff --git a/tasks/destroy.yml b/tasks/destroy.yml deleted file mode 100644 index 3dc52fb..0000000 --- a/tasks/destroy.yml +++ /dev/null @@ -1,2 +0,0 @@ -# This task is executed when a project is destroyed. Usually empty. ---- diff --git a/tasks/main.yml b/tasks/main.yml index 027468a..f427685 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,2 +1,2 @@ --- -- include_tasks: "{{ role_path }}/tasks/{{ stackhead_action }}.yml" \ No newline at end of file +- include_tasks: "{{ stackhead__roles }}/stackhead_module_api/tasks/module-main.yml" diff --git a/tasks/deploy.yml b/tasks/steps/deploy.yml similarity index 85% rename from tasks/deploy.yml rename to tasks/steps/deploy.yml index 3b7d606..80cb82a 100644 --- a/tasks/deploy.yml +++ b/tasks/steps/deploy.yml @@ -11,5 +11,5 @@ with_items: "{{ app_config.domains }}" - name: Generate Caddy Terraform file - include_tasks: "{{ role_path }}/tasks/steps/generate-serverconfig-tf.yml" + include_tasks: "{{ role_path }}/tasks/caddy_steps/generate-serverconfig-tf.yml" diff --git a/tasks/setup.yml b/tasks/steps/setup.yml similarity index 89% rename from tasks/setup.yml rename to tasks/steps/setup.yml index fd059ef..1891b87 100644 --- a/tasks/setup.yml +++ b/tasks/steps/setup.yml @@ -12,7 +12,7 @@ vars: caddy_install_source: package - name: Overwrite Caddyfile - include_tasks: "{{ role_path }}/tasks/steps/generate-caddyfile-tf.yml" + include_tasks: "{{ role_path }}/tasks/caddy_steps/generate-caddyfile-tf.yml" - name: Restart Caddy command: /bin/true notify: