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

23 lines
527 B
YAML
Raw Normal View History

2023-05-20 17:23:11 +02:00
---
- name: Check n8n directory exist
ansible.builtin.file:
path: n8n
state: directory
- name: Copy template conf
ansible.builtin.template:
src: "{{ item.src }}"
dest: "n8n/{{ item.dest }}"
loop:
- { src: 'docker-compose.yml.j2', dest: 'docker-compose.yml' }
register: n8n_copy_templates_results
2023-05-21 10:57:56 +02:00
- name: Update and restart container
2023-05-20 17:23:11 +02:00
community.docker.docker_compose:
project_src: n8n
state: present
pull: true
2023-05-21 10:57:56 +02:00
restarted: "{{ n8n_copy_templates_results.changed }}"
2023-05-20 17:23:11 +02:00
become: true