From 4d91f29b3907316699173e024f3db51544fc8667 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Mon, 4 Mar 2019 14:40:35 -0800 Subject: [PATCH] Run docker-compose pull before docker-compose up This will make sure that the latest relevant images are in the local image storage, and therefore, will cause docker-compose up to recreate containers when the images are updated. Change-Id: Ic6f0bc8c8aea5b5c16501f4ab5d3095fb70c0ff7 --- playbooks/roles/gitea/tasks/main.yaml | 4 ++++ playbooks/roles/haproxy/tasks/main.yaml | 4 ++++ playbooks/roles/registry/tasks/main.yaml | 4 ++++ playbooks/roles/zuul-preview/tasks/main.yaml | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/playbooks/roles/gitea/tasks/main.yaml b/playbooks/roles/gitea/tasks/main.yaml index 42539fdcc3..95dffa875d 100644 --- a/playbooks/roles/gitea/tasks/main.yaml +++ b/playbooks/roles/gitea/tasks/main.yaml @@ -37,6 +37,10 @@ name: - docker-compose state: present +- name: Run docker-compose pull + shell: + cmd: docker-compose pull + chdir: /etc/gitea-docker/ - name: Run docker-compose up shell: cmd: docker-compose up -d diff --git a/playbooks/roles/haproxy/tasks/main.yaml b/playbooks/roles/haproxy/tasks/main.yaml index 5ffe0a2397..77ea84acba 100644 --- a/playbooks/roles/haproxy/tasks/main.yaml +++ b/playbooks/roles/haproxy/tasks/main.yaml @@ -20,6 +20,10 @@ name: - docker-compose state: present +- name: Run docker-compose pull + shell: + cmd: docker-compose pull + chdir: /etc/haproxy-docker/ - name: Run docker-compose up shell: cmd: docker-compose up -d diff --git a/playbooks/roles/registry/tasks/main.yaml b/playbooks/roles/registry/tasks/main.yaml index 5fcaad3081..8d4871d341 100644 --- a/playbooks/roles/registry/tasks/main.yaml +++ b/playbooks/roles/registry/tasks/main.yaml @@ -36,6 +36,10 @@ name: - docker-compose state: present +- name: Run docker-compose pull + shell: + cmd: docker-compose pull + chdir: /etc/registry-docker/ - name: Run docker-compose up shell: cmd: docker-compose up -d diff --git a/playbooks/roles/zuul-preview/tasks/main.yaml b/playbooks/roles/zuul-preview/tasks/main.yaml index b55694e1c5..2dba22e8c0 100644 --- a/playbooks/roles/zuul-preview/tasks/main.yaml +++ b/playbooks/roles/zuul-preview/tasks/main.yaml @@ -7,6 +7,10 @@ name: - docker-compose state: present +- name: Run docker-compose pull + shell: + cmd: docker-compose pull + chdir: /etc/zuul-preview-docker/ - name: Run docker-compose up shell: cmd: docker-compose up -d