def task_install_docker(distribution):
 if is_centos_or_rhel(distribution):
  update = 'yum --assumeyes update && '
 else:
  update = ''
 return retry_effect_with_timeout(run(command=(('[[ -e /usr/bin/docker ]] || { ' + update) + 'curl https://get.docker.com/ > /tmp/install-docker.sh && sh /tmp/install-docker.sh; }')), timeout=(5.0 * 60.0))

def task_install_docker ( distribution ) : if is_centos_or_rhel ( distribution ) : update = 'yum --assumeyes update && ' else : update = '' return retry_effect_with_timeout ( run ( command = ( ( '[[ -e /usr/bin/docker ]] || { ' + update ) + 'curl https://get.docker.com/ > /tmp/install-docker.sh && sh /tmp/install-docker.sh; }' ) ) , timeout = ( 5.0 * 60.0 ) )
return an effect for installing docker if it is not already installed .