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