Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions roles/watchtower/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
---
- name: Stop and remove any existing container
docker_container:
community.docker.docker_container:
name: watchtower
state: absent

- name: Create and start container
docker_container:
community.docker.docker_container:
name: watchtower
image: "containrrr/watchtower:{{ watchtower.tag }}"
pull: yes
image: "nickfedor/watchtower:{{ watchtower.tag }}"
pull: true
recreate: true
networks:
- name: postfix
aliases:
- watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /etc/localtime:/etc/localtime:ro
restart_policy: unless-stopped
state: started
env:
Expand All @@ -33,4 +32,4 @@
WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT: "{{ watchtower.notification_email_server_port }}"
WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER: "{{ watchtower.notification_email_server_user }}"
WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD: "{{ watchtower.notification_email_server_password }}"
WATCHTOWER_NOTIFICATION_EMAIL_DELAY: "{{ watchtower.notification_email_delay }}"
WATCHTOWER_NOTIFICATION_EMAIL_DELAY: "{{ watchtower.notification_email_delay }}"