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
764 B
YAML
Raw Normal View History

2022-12-29 11:32:46 +00:00
- name: Create app directory
file:
2023-01-06 14:45:21 +00:00
path: /apps/forgejo
2022-12-29 11:32:46 +00:00
state: directory
- name: Copy Docker Compose script
copy:
src: "{{ role_path }}/files/docker-compose.yml"
2023-01-06 14:45:21 +00:00
dest: /apps/forgejo/docker-compose.yml
2022-12-29 11:32:46 +00:00
- name: Create data directory
file:
2023-01-06 14:45:21 +00:00
path: /data/forgejo
2022-12-29 11:32:46 +00:00
state: directory
owner: 1000
group: 1000
- name: Copy conf directory
file:
2023-01-06 14:45:21 +00:00
path: /apps/forgejo/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-06 14:45:21 +00:00
dest: /apps/forgejo/conf/app.ini
2022-12-29 11:32:46 +00:00
register: config
- name: Start the Docker Compose
community.docker.docker_compose:
2023-01-06 14:45:21 +00:00
project_src: /apps/forgejo
2022-12-29 11:32:46 +00:00
pull: true
remove_orphans: true
restarted: "{{ config.changed }}"