Don't attach containers to default network

This commit is contained in:
Sam A. 2023-01-06 14:37:50 +01:00
parent af3ec54ca1
commit a1f6b035c7
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA
2 changed files with 14 additions and 0 deletions

View file

@ -1,10 +1,17 @@
# vim: ft=yaml.ansible
---
- name: Create Docker network for Watchtower
docker_network:
name: watchtower
state: present
- name: Deploy Watchtower Docker container
docker_container:
name: watchtower
image: containrrr/watchtower:{{ services.watchtower.version }}
restart_policy: unless-stopped
networks:
- name: watchtower
env:
WATCHTOWER_POLL_INTERVAL: '3600'
volumes:

View file

@ -7,11 +7,18 @@
mode: u=rwx,g=rx,o=rx
state: directory
- name: Create Docker network for Wireguard
docker_network:
name: wireguard
state: present
- name: Deploy Wireguard Docker container
docker_container:
name: wireguard
image: linuxserver/wireguard:{{ services.wireguard.version }}
restart_policy: unless-stopped
networks:
- name: wireguard
env:
SERVERURL: "{{ services.wireguard.domain }}"
SERVERPORT: '51820'