Retry yum/apt/rpm download commands, fix succeeded filter

This commit is contained in:
Matthew Mosesohn
2017-03-17 12:55:17 +03:00
parent b4a1ba828a
commit 7760c3e4aa
4 changed files with 19 additions and 7 deletions

View File

@@ -92,7 +92,7 @@
- name: Download containers if pull is required or told to always pull
command: "{{ docker_bin_dir }}/docker pull {{ pull_args }}"
register: pull_task_result
until: pull_task_result|success
until: pull_task_result|succeeded
retries: 4
delay: "{{ retry_stagger | random + 3 }}"
when: "{{ download.enabled|bool and download.container|bool and pull_required|bool|default(download_always_pull) }}"
@@ -150,7 +150,7 @@
delegate_to: localhost
become: false
register: get_task
until: get_task|success
until: get_task|succeeded
retries: 4
delay: "{{ retry_stagger | random + 3 }}"
when: (not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"] and inventory_hostname != groups['kube-master'][0] or download_delegate == "localhost") and download_run_once|bool and download.enabled|bool and download.container|bool