31 lines
764 B
YAML
31 lines
764 B
YAML
- name: Create app directory
|
|
file:
|
|
path: /apps/forgejo
|
|
state: directory
|
|
- name: Copy Docker Compose script
|
|
copy:
|
|
src: "{{ role_path }}/files/docker-compose.yml"
|
|
dest: /apps/forgejo/docker-compose.yml
|
|
- name: Create data directory
|
|
file:
|
|
path: /data/forgejo
|
|
state: directory
|
|
owner: 1000
|
|
group: 1000
|
|
- name: Copy conf directory
|
|
file:
|
|
path: /apps/forgejo/conf
|
|
state: directory
|
|
owner: 1000
|
|
group: 1000
|
|
- name: Copy app.ini
|
|
template:
|
|
src: "{{ role_path }}/templates/app.ini"
|
|
dest: /apps/forgejo/conf/app.ini
|
|
register: config
|
|
- name: Start the Docker Compose
|
|
community.docker.docker_compose:
|
|
project_src: /apps/forgejo
|
|
pull: true
|
|
remove_orphans: true
|
|
restarted: "{{ config.changed }}"
|