2024-09-26 22:02:36 +00:00
|
|
|
---
|
|
|
|
- name: Set common facts
|
|
|
|
ansible.builtin.import_tasks: tasks/set-default-facts.yml
|
|
|
|
|
|
|
|
- name: Deploy {{ svc.name }}
|
|
|
|
vars:
|
|
|
|
svc: "{{ vikunja_svc }}"
|
|
|
|
yml: "{{ vikunja_yml }}"
|
|
|
|
compose: "{{ vikunja_compose }}"
|
|
|
|
block:
|
|
|
|
- name: Import prepare tasks for common service
|
|
|
|
ansible.builtin.import_tasks: tasks/prepare-common-service.yml
|
|
|
|
|
|
|
|
- name: Template config
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: yml.j2
|
|
|
|
dest: "{{ (service_path, 'config.yml') | path_join }}"
|
2024-10-02 22:50:21 +00:00
|
|
|
mode: "0644"
|
2024-09-26 22:02:36 +00:00
|
|
|
register: cmd_result
|
|
|
|
|
|
|
|
- name: Set the docker force-recreate flag
|
|
|
|
ansible.builtin.set_fact:
|
|
|
|
docker_force_recreate: --force-recreate
|
|
|
|
when: cmd_result.changed # noqa: no-handler We need to handle the restart per service. Handlers don't support variables.
|
|
|
|
|
|
|
|
- name: Import start tasks for common service
|
|
|
|
ansible.builtin.import_tasks: tasks/start-common-service.yml
|