From c4b7a45842843290d81e0cb29081d01f2210bfee Mon Sep 17 00:00:00 2001 From: Luke Meyer Date: Tue, 22 Aug 2017 17:34:14 -0400 Subject: add retry on repoquery_cmd --- roles/docker/tasks/package_docker.yml | 2 ++ roles/lib_utils/src/ansible/repoquery.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/docker/tasks/package_docker.yml b/roles/docker/tasks/package_docker.yml index bc52ab60c..3db5a990f 100644 --- a/roles/docker/tasks/package_docker.yml +++ b/roles/docker/tasks/package_docker.yml @@ -3,6 +3,8 @@ command: "{{ repoquery_cmd }} --installed --qf '%{version}' docker" when: not openshift.common.is_atomic | bool register: curr_docker_version + retries: 4 + until: not curr_docker_version | failed changed_when: false - name: Error out if Docker pre-installed but too old diff --git a/roles/lib_utils/src/ansible/repoquery.py b/roles/lib_utils/src/ansible/repoquery.py index a0c48d3a4..5f5b93639 100644 --- a/roles/lib_utils/src/ansible/repoquery.py +++ b/roles/lib_utils/src/ansible/repoquery.py @@ -19,7 +19,7 @@ def main(): show_duplicates=dict(default=False, required=False, type='bool'), match_version=dict(default=None, required=False, type='str'), ignore_excluders=dict(default=False, required=False, type='bool'), - retries=dict(default=3, required=False, type='int'), + retries=dict(default=4, required=False, type='int'), retry_interval=dict(default=5, required=False, type='int'), ), supports_check_mode=False, -- cgit v1.2.3