From 461d812316299cc4cc5467d9a01d665be2cc666f Mon Sep 17 00:00:00 2001 From: justus Date: Mon, 16 Dec 2024 09:52:58 -0500 Subject: [PATCH] Pull Docker images before bringing them up --- ansible/buildHomelab.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ansible/buildHomelab.yaml b/ansible/buildHomelab.yaml index e6338b2..7fd3d5b 100644 --- a/ansible/buildHomelab.yaml +++ b/ansible/buildHomelab.yaml @@ -83,10 +83,16 @@ src: assets/{{ inventory_hostname }}/compose.yml.j2 dest: /root/docker/compose.yml backup: true + - name: Pull images + ansible.builtin.shell: docker compose pull + args: + chdir: /root/docker - name: Run Docker ansible.builtin.shell: docker compose up -d --remove-orphans args: chdir: /root/docker + - name: Prune images + ansible.builtin.shell: docker image prune -f - name: Local server Wireguard hosts: