parameterize directories

This commit is contained in:
Pim Kunis 2023-01-07 20:32:42 +01:00
parent 5bf6d7acbc
commit cd17ed372c
21 changed files with 88 additions and 66 deletions

View file

@ -1,31 +1,31 @@
- name: Create app directory
file:
path: /srv/forgejo
path: "{{ service_dir }}"
state: directory
- name: Copy Docker Compose script
copy:
src: "{{ role_path }}/files/docker-compose.yml"
dest: /srv/forgejo/docker-compose.yml
template:
src: "{{ role_path }}/templates/docker-compose.yml.j2"
dest: "{{ service_dir }}/docker-compose.yml"
- name: Create data directory
file:
path: /data/forgejo
path: "{{ data_dir }}"
state: directory
owner: 1000
group: 1000
- name: Copy conf directory
file:
path: /srv/forgejo/conf
path: "{{ service_dir }}/conf"
state: directory
owner: 1000
group: 1000
- name: Copy app.ini
template:
src: "{{ role_path }}/templates/app.ini"
dest: /srv/forgejo/conf/app.ini
dest: "{{ service_dir }}/conf/app.ini"
register: config
- name: Start the Docker Compose
docker_compose:
project_src: /srv/forgejo
project_src: "{{ service_dir }}"
pull: true
remove_orphans: true
restarted: "{{ config.changed }}"