This repository has been archived on 2023-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
max/roles/forgejo/tasks/main.yml

32 lines
791 B
YAML
Raw Normal View History

2022-12-29 11:32:46 +00:00
- name: Create app directory
file:
2023-01-07 19:32:42 +00:00
path: "{{ service_dir }}"
2022-12-29 11:32:46 +00:00
state: directory
- name: Copy Docker Compose script
2023-01-07 19:32:42 +00:00
template:
src: "{{ role_path }}/templates/docker-compose.yml.j2"
dest: "{{ service_dir }}/docker-compose.yml"
2022-12-29 11:32:46 +00:00
- name: Create data directory
file:
2023-01-07 19:32:42 +00:00
path: "{{ data_dir }}"
2022-12-29 11:32:46 +00:00
state: directory
owner: 1000
group: 1000
- name: Copy conf directory
file:
2023-01-07 19:32:42 +00:00
path: "{{ service_dir }}/conf"
2022-12-29 11:32:46 +00:00
state: directory
owner: 1000
group: 1000
- name: Copy app.ini
template:
2023-01-03 18:07:04 +00:00
src: "{{ role_path }}/templates/app.ini"
2023-01-07 19:32:42 +00:00
dest: "{{ service_dir }}/conf/app.ini"
2022-12-29 11:32:46 +00:00
register: config
- name: Start the Docker Compose
2023-01-07 18:08:49 +00:00
docker_compose:
2023-01-07 19:32:42 +00:00
project_src: "{{ service_dir }}"
2022-12-29 11:32:46 +00:00
pull: true
remove_orphans: true
restarted: "{{ config.changed }}"