This commit is contained in:
Florian RICHER 2023-11-11 14:53:32 +01:00
parent 6e78f02cd4
commit 68d3c1e4a0
4 changed files with 76 additions and 0 deletions

22
roles/ryot/tasks/base.yml Normal file
View file

@ -0,0 +1,22 @@
---
- name: Check ryot directory exist
ansible.builtin.file:
path: ryot
state: directory
- name: Copy template conf
ansible.builtin.template:
src: "{{ item.src }}"
dest: "ryot/{{ item.dest }}"
loop:
- { src: 'docker-compose.yml.j2', dest: 'docker-compose.yml' }
register: ryot_copy_templates_results
- name: Update and restart container
community.docker.docker_compose:
project_src: ryot
state: present
pull: true
restarted: "{{ ryot_copy_templates_results.changed }}"
become: true