2023-10-15 21:06:26 +02:00
|
|
|
---
|
|
|
|
|
2024-10-27 18:57:36 +01:00
|
|
|
- name: Check git directory exist
|
2023-10-15 21:06:26 +02:00
|
|
|
ansible.builtin.file:
|
2024-10-27 18:57:36 +01:00
|
|
|
path: git
|
2023-10-15 21:06:26 +02:00
|
|
|
state: directory
|
|
|
|
|
|
|
|
- name: Copy template conf
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: "{{ item.src }}"
|
2024-10-27 18:57:36 +01:00
|
|
|
dest: "git/{{ item.dest }}"
|
2023-10-15 21:06:26 +02:00
|
|
|
loop:
|
|
|
|
- { src: 'docker-compose.yml', dest: 'docker-compose.yml' }
|
2023-11-21 23:00:10 +01:00
|
|
|
- { src: 'config.yml', dest: 'config.yml' }
|
2023-10-15 21:06:26 +02:00
|
|
|
|
|
|
|
- name: Update and restart container
|
2024-07-14 21:39:23 +02:00
|
|
|
community.docker.docker_compose_v2:
|
2024-10-27 18:57:36 +01:00
|
|
|
project_src: git
|
2023-10-15 21:06:26 +02:00
|
|
|
state: present
|
2024-07-14 21:39:23 +02:00
|
|
|
pull: always
|
2023-10-15 21:06:26 +02:00
|
|
|
become: true
|