This repository has been archived on 2024-11-01. You can view files and clone it, but cannot push or open issues or pull requests.
services/roles/forgejo/tasks/main.yml

40 lines
1.4 KiB
YAML
Raw Normal View History

2023-06-13 21:32:09 +00:00
---
2023-12-14 01:20:13 +00:00
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
2023-06-13 21:32:09 +00:00
- name: Deploy {{ svc.name }}
2023-12-14 01:20:13 +00:00
vars:
svc: "{{ forgejo_svc }}"
env: "{{ forgejo_env }}"
compose: "{{ forgejo_compose }}"
2023-06-13 21:32:09 +00:00
block:
2024-01-26 01:58:11 +00:00
- name: Import prepare tasks for common service
ansible.builtin.import_tasks: tasks/prepare-common-service.yml
- name: Copy the template files
ansible.builtin.copy:
src: templates/
dest: "{{ (service_path, 'templates') | path_join }}"
mode: "0644"
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: Template the custom footer
ansible.builtin.template:
src: footer.tmpl.j2
dest: "{{ (service_path, 'templates', 'custom', 'footer.tmpl') | path_join }}"
mode: "0644"
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