From 130d66d24db86216109b32a5bb428e1e2270d96c Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Tue, 27 Sep 2016 13:44:29 +0200 Subject: [PATCH] Fix containers download condition Save/push/load containers if only download.enabled and download.container Signed-off-by: Bogdan Dobrelya --- roles/download/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/download/tasks/main.yml b/roles/download/tasks/main.yml index 6329a1108..9b9caf126 100644 --- a/roles/download/tasks/main.yml +++ b/roles/download/tasks/main.yml @@ -75,7 +75,7 @@ shell: docker save "{{ download.repo }}:{{ download.tag }}" > "{{ fname }}" delegate_to: "{{groups['kube-master'][0]}}" run_once: true - when: ansible_os_family != "CoreOS" and download_run_once|bool + when: ansible_os_family != "CoreOS" and download_run_once|bool and download.enabled|bool and download.container|bool - name: Download | get container images synchronize: @@ -86,8 +86,8 @@ until: get_task|success retries: 4 delay: "{{ retry_stagger | random + 3 }}" - when: ansible_os_family != "CoreOS" and inventory_hostname != groups['kube-master'][0] and download_run_once|bool + when: ansible_os_family != "CoreOS" and inventory_hostname != groups['kube-master'][0] and download_run_once|bool and download.enabled|bool and download.container|bool - name: Download | load container images shell: docker load < "{{ fname }}" - when: ansible_os_family != "CoreOS" and inventory_hostname != groups['kube-master'][0] and download_run_once|bool + when: ansible_os_family != "CoreOS" and inventory_hostname != groups['kube-master'][0] and download_run_once|bool and download.enabled|bool and download.container|bool