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

22 lines
535 B
YAML
Raw Normal View History

---
- 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