1
0
Fork 0
myserver-configuration/roles/matrix/tasks/base.yml

29 lines
704 B
YAML
Raw Normal View History

2023-05-20 17:23:11 +02:00
---
- name: Check matrix directory exist
ansible.builtin.file:
path: matrix
state: directory
- name: Copy matrix conf
ansible.builtin.copy:
src: .
dest: matrix/
register: matrix_copy_files_results
- name: Copy template conf
ansible.builtin.template:
src: "{{ item.src }}"
dest: "matrix/{{ item.dest }}"
loop:
- { src: 'docker-compose.yml.j2', dest: 'docker-compose.yml' }
register: matrix_copy_templates_results
2023-05-21 10:57:56 +02:00
- name: Update and restart container
2024-07-14 21:39:23 +02:00
community.docker.docker_compose_v2:
2023-05-20 17:23:11 +02:00
project_src: matrix
state: present
2024-07-14 21:39:23 +02:00
pull: always
2023-05-21 10:57:56 +02:00
restarted: "{{ matrix_copy_files_results.changed or matrix_copy_templates_results.changed }}"
2023-05-20 17:23:11 +02:00
become: true