22 lines
535 B
YAML
22 lines
535 B
YAML
|
---
|
||
|
|
||
|
- name: Check gitea directory exist
|
||
|
ansible.builtin.file:
|
||
|
path: gitea
|
||
|
state: directory
|
||
|
|
||
|
- name: Copy template conf
|
||
|
ansible.builtin.template:
|
||
|
src: "{{ item.src }}"
|
||
|
dest: "gitea/{{ item.dest }}"
|
||
|
loop:
|
||
|
- { src: 'docker-compose.yml', dest: 'docker-compose.yml' }
|
||
|
register: gitea_copy_templates_results
|
||
|
|
||
|
- name: Update and restart container
|
||
|
community.docker.docker_compose:
|
||
|
project_src: gitea
|
||
|
state: present
|
||
|
pull: true
|
||
|
restarted: "{{ gitea_copy_templates_results.changed }}"
|
||
|
become: true
|