Add retries for packages installation
Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
parent
6fdcaa1a63
commit
783871a253
2 changed files with 12 additions and 0 deletions
|
@ -27,6 +27,10 @@
|
||||||
id: "{{item}}"
|
id: "{{item}}"
|
||||||
keyserver: "{{docker_repo_key_info.keyserver}}"
|
keyserver: "{{docker_repo_key_info.keyserver}}"
|
||||||
state: present
|
state: present
|
||||||
|
register: keyserver_task_result
|
||||||
|
until: keyserver_task_result|success
|
||||||
|
retries: 4
|
||||||
|
delay: "{{ 20 | random + 3 }}"
|
||||||
with_items: "{{ docker_repo_key_info.repo_keys }}"
|
with_items: "{{ docker_repo_key_info.repo_keys }}"
|
||||||
when: ansible_os_family != "CoreOS"
|
when: ansible_os_family != "CoreOS"
|
||||||
|
|
||||||
|
@ -51,6 +55,10 @@
|
||||||
pkg: "{{item.name}}"
|
pkg: "{{item.name}}"
|
||||||
force: "{{item.force|default(omit)}}"
|
force: "{{item.force|default(omit)}}"
|
||||||
state: present
|
state: present
|
||||||
|
register: docker_task_result
|
||||||
|
until: docker_task_result|success
|
||||||
|
retries: 4
|
||||||
|
delay: "{{ 20 | random + 3 }}"
|
||||||
with_items: "{{ docker_package_info.pkgs }}"
|
with_items: "{{ docker_package_info.pkgs }}"
|
||||||
when: (ansible_os_family != "CoreOS") and (docker_package_info.pkgs|length > 0)
|
when: (ansible_os_family != "CoreOS") and (docker_package_info.pkgs|length > 0)
|
||||||
|
|
||||||
|
|
|
@ -101,6 +101,10 @@
|
||||||
module: "{{ ansible_pkg_mgr }}"
|
module: "{{ ansible_pkg_mgr }}"
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: latest
|
state: latest
|
||||||
|
register: pkgs_task_result
|
||||||
|
until: pkgs_task_result|success
|
||||||
|
retries: 4
|
||||||
|
delay: "{{ 20 | random + 3 }}"
|
||||||
with_items: "{{required_pkgs | default([]) | union(common_required_pkgs|default([]))}}"
|
with_items: "{{required_pkgs | default([]) | union(common_required_pkgs|default([]))}}"
|
||||||
when: ansible_os_family != "CoreOS"
|
when: ansible_os_family != "CoreOS"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue