1
0
Fork 0
myserver-configuration/roles/portfolio/tasks/base.yml
2023-11-21 21:24:27 +01:00

22 lines
No EOL
559 B
YAML

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