From 2f413b3e99cc0e1b0e1cffe2923f4981625413a1 Mon Sep 17 00:00:00 2001 From: Jesper Hess Nielsen Date: Mon, 4 Mar 2019 16:28:51 +0100 Subject: [PATCH] Switch out watchtower with Ouroboros --- playbook.yml | 2 +- roles/docker/tasks/services/ouroboros.yml | 18 ++++++++++++++++++ roles/docker/tasks/services/watchtower.yml | 12 ------------ roles/docker/tasks/services/websites.yml | 4 ++-- 4 files changed, 21 insertions(+), 15 deletions(-) create mode 100644 roles/docker/tasks/services/ouroboros.yml delete mode 100644 roles/docker/tasks/services/watchtower.yml diff --git a/playbook.yml b/playbook.yml index db999e19..c953aa38 100644 --- a/playbook.yml +++ b/playbook.yml @@ -23,7 +23,7 @@ - docker_registry - drone - websites - - watchtower + - ouroboros smtp_host: postfix smtp_port: 587 diff --git a/roles/docker/tasks/services/ouroboros.yml b/roles/docker/tasks/services/ouroboros.yml new file mode 100644 index 00000000..c5aae9f8 --- /dev/null +++ b/roles/docker/tasks/services/ouroboros.yml @@ -0,0 +1,18 @@ +--- +- name: ouroboros container + docker_container: + name: ouroboros + image: pyouroboros/ouroboros + restart_policy: unless-stopped + networks: + - name: external_services + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - /root/.docker/config.json:/root/.docker/config.json + env: + LABEL_ENABLE: "true" + LABELS_ONLY: "true" + CLEANUP: "true" + LATEST: "true" + CRON: "*/1 * * * *" + \ No newline at end of file diff --git a/roles/docker/tasks/services/watchtower.yml b/roles/docker/tasks/services/watchtower.yml deleted file mode 100644 index ffe05afa..00000000 --- a/roles/docker/tasks/services/watchtower.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -- name: watchtower container - docker_container: - name: watchtower - image: v2tec/watchtower - restart_policy: unless-stopped - networks: - - name: external_services - volumes: - - /var/run/docker.sock:/var/run/docker.sock - - /root/.docker/config.json:/config.json - command: ["--label-enable"] diff --git a/roles/docker/tasks/services/websites.yml b/roles/docker/tasks/services/websites.yml index 74649cd8..2436da2c 100644 --- a/roles/docker/tasks/services/websites.yml +++ b/roles/docker/tasks/services/websites.yml @@ -12,7 +12,7 @@ LETSENCRYPT_HOST: "{{ data_coop_website.domain }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" labels: - com.centurylinklabs.watchtower.enable: "true" + com.ouroboros.enable: "true" - name: setup cryptohagen.dk website docker container docker_container: @@ -26,4 +26,4 @@ LETSENCRYPT_HOST: "{{ cryptohagen_website.domain }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" labels: - com.centurylinklabs.watchtower.enable: "true" + com.ouroboros.enable: "true"