From 498d3243576dadcf8a3107a2165d97374425fc1f Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Wed, 3 Jan 2024 16:51:25 +0000 Subject: [PATCH] Use service-images-pull role for letsencrypt and venus This reduces code duplication. Change-Id: Ie529875aaa42435835417468868250bbe4fcf649 --- ansible/roles/letsencrypt/tasks/pull.yml | 12 ++---------- ansible/roles/venus/tasks/pull.yml | 12 ++---------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/ansible/roles/letsencrypt/tasks/pull.yml b/ansible/roles/letsencrypt/tasks/pull.yml index 33880e0b3d..53f9c5fda1 100644 --- a/ansible/roles/letsencrypt/tasks/pull.yml +++ b/ansible/roles/letsencrypt/tasks/pull.yml @@ -1,11 +1,3 @@ --- -- name: Pulling LetsEncrypt images - become: true - kolla_container: - action: "pull_image" - common_options: "{{ docker_common_options }}" - image: "{{ item.value.image }}" - when: - - inventory_hostname in groups[item.value.group] - - item.value.enabled | bool - with_dict: "{{ letsencrypt_services }}" +- import_role: + role: service-images-pull diff --git a/ansible/roles/venus/tasks/pull.yml b/ansible/roles/venus/tasks/pull.yml index 5c2d03b7d3..53f9c5fda1 100644 --- a/ansible/roles/venus/tasks/pull.yml +++ b/ansible/roles/venus/tasks/pull.yml @@ -1,11 +1,3 @@ --- -- name: Pulling venus images - become: true - kolla_container: - action: "pull_image" - common_options: "{{ docker_common_options }}" - image: "{{ item.value.image }}" - when: - - inventory_hostname in groups[item.value.group] - - item.value.enabled | bool - with_dict: "{{ venus_services }}" +- import_role: + role: service-images-pull