From 4e42055dad64c8da8b4176dad1f52a261bfcb115 Mon Sep 17 00:00:00 2001 From: Dirk Wirts Date: Fri, 3 Nov 2023 16:13:04 +0100 Subject: [PATCH] update --- ansible-setup_watchtower.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 ansible-setup_watchtower.yml diff --git a/ansible-setup_watchtower.yml b/ansible-setup_watchtower.yml new file mode 100644 index 0000000..9c2a4de --- /dev/null +++ b/ansible-setup_watchtower.yml @@ -0,0 +1,19 @@ +--- +- name: Setup Watchtower Updater Script + hosts: all + become: true + tasks: + - name: Create watchtower updater script + ansible.builtin.copy: + dest: /usr/local/bin/docker-update + mode: '0755' + owner: root + group: root + content: | + #!/bin/bash + test -x "$(which docker)" || exit 1 + docker run --rm \ + -v /var/run/docker.sock:/var/run/docker.sock \ + containrrr/watchtower \ + --run-once + docker image prune -a