diff --git a/roles/docker/handlers/main.yaml b/roles/docker/handlers/main.yaml index 2ea8b6c..ec319f0 100644 --- a/roles/docker/handlers/main.yaml +++ b/roles/docker/handlers/main.yaml @@ -1,10 +1,10 @@ --- -- name: Stop service +- name: Stop service {{ docker_app_name }} listen: Restart service community.docker.docker_compose_v2: project_src: "{{ docker_dir }}" state: stopped -- name: Start service +- name: Start service {{ docker_app_name }} listen: Restart service community.docker.docker_compose_v2: project_src: "{{ docker_dir }}" diff --git a/roles/docker/tasks/main.yaml b/roles/docker/tasks/main.yaml index 301b4f8..5ed6087 100644 --- a/roles/docker/tasks/main.yaml +++ b/roles/docker/tasks/main.yaml @@ -1,10 +1,10 @@ --- -- name: Create dir +- name: Create dir for {{ docker_app_name }} ansible.builtin.file: path: "{{ docker_dir }}" state: directory mode: "0775" -- name: Write files +- name: Write files for {{ docker_app_name }} ansible.builtin.copy: src: "{{ item }}" dest: "{{ docker_dir }}/" @@ -14,7 +14,7 @@ - files/{{ docker_app_name }}/.* notify: - Restart service -- name: Write templates +- name: Write templates for {{ docker_app_name }} ansible.builtin.template: src: "{{ item }}" dest: "{{ docker_dir }}/{{ item | basename | regex_replace('\\.j2$', '') }}" @@ -24,9 +24,9 @@ - templates/{{ docker_app_name }}/.*.j2 notify: - Restart service -- name: Flush handlers +- name: Flush handlers for {{ docker_app_name }} ansible.builtin.meta: flush_handlers -- name: Ensure service is started +- name: Ensure service is started {{ docker_app_name }} community.docker.docker_compose_v2: project_src: "{{ docker_dir }}" state: present