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

23 lines
568 B
YAML
Raw Normal View History

2023-09-24 12:28:25 +02:00
---
- name: Check wireguard directory exist
ansible.builtin.file:
path: wireguard
state: directory
- name: Copy template conf
ansible.builtin.template:
src: "{{ item.src }}"
dest: "wireguard/{{ item.dest }}"
loop:
- { src: 'docker-compose.yml.j2', dest: 'docker-compose.yml' }
register: wireguard_copy_templates_results
- name: Update and restart container
2024-07-14 21:39:23 +02:00
community.docker.docker_compose_v2:
2023-09-24 12:28:25 +02:00
project_src: wireguard
state: present
2024-07-14 21:39:23 +02:00
pull: always
2023-09-24 12:28:25 +02:00
restarted: "{{ wireguard_copy_templates_results.changed }}"
become: true