diff --git a/roles/ceph-container-common/tasks/fetch_image.yml b/roles/ceph-container-common/tasks/fetch_image.yml index 30c69289b..b0e4ef914 100644 --- a/roles/ceph-container-common/tasks/fetch_image.yml +++ b/roles/ceph-container-common/tasks/fetch_image.yml @@ -176,8 +176,14 @@ - nfs_group_name in group_names - ceph_nfs_container_inspect_before_pull.get('rc') == 0 +- name: set_fact timeout_command + set_fact: + timeout_command: "{{ 'timeout -s KILL ' ~ docker_pull_timeout if (docker_pull_timeout != '0') else '' }}" + when: + - (ceph_docker_dev_image is undefined or not ceph_docker_dev_image) + - name: "pulling {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} image" - command: "timeout {{ docker_pull_timeout }} {{ container_binary }} pull {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" + command: "{{ timeout_command }} {{ container_binary }} pull {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" changed_when: false register: docker_image until: docker_image.rc == 0