From 98fcc2d634713310c05d1fc5cafecf7b2aa7fdb5 Mon Sep 17 00:00:00 2001 From: Sam Al-Sapti Date: Wed, 4 Oct 2023 19:44:39 +0200 Subject: [PATCH] Include service name in task names in block.yml --- roles/docker/tasks/block.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/roles/docker/tasks/block.yml b/roles/docker/tasks/block.yml index 9ad47734..82da08e1 100644 --- a/roles/docker/tasks/block.yml +++ b/roles/docker/tasks/block.yml @@ -1,24 +1,24 @@ # vim: ft=yaml.ansible --- -- name: Create volume folder +- name: Create volume folder for service {{ service.name }} file: name: "{{ service.vars.volume_folder }}" state: directory -- name: Upload Compose file +- name: Upload Compose file for service {{ service.name }} template: src: compose-files/{{ service.name }}.yml.j2 dest: "{{ service.vars.volume_folder }}/docker-compose.yml" -- name: Run pre-deployment tasks +- name: Run pre-deployment tasks for service {{ service.name }} include_tasks: pre_deploy/{{ service.name }}.yml when: service.vars.pre_deploy_tasks is defined and service.vars.pre_deploy_tasks -- name: Deploy Compose stack +- name: Deploy Compose stack for service {{ service.name }} command: docker compose up -d --remove-orphans --pull always args: chdir: "{{ service.vars.volume_folder }}" -- name: Run post-deployment tasks +- name: Run post-deployment tasks for service {{ service.name }} include_tasks: post_deploy/{{ service.name }}.yml when: service.vars.post_deploy_tasks is defined and service.vars.post_deploy_tasks