mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-01 09:38:12 -03:30
race condition in download role under vagrant
using a shared folder can cause race conditions for the download role as it tries to download files on all the nodes to the same shared path. This adds a flag to run the tasks in the download role on just one node.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
---
|
||||
local_release_dir: /tmp
|
||||
|
||||
# if this is set to true will only download files once
|
||||
download_run_once: False
|
||||
|
||||
# Versions
|
||||
kube_version: "v1.2.4"
|
||||
etcd_version: v2.2.5
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
- name: Create dest directories
|
||||
file: path={{local_release_dir}}/{{item.dest|dirname}} state=directory recurse=yes
|
||||
with_items: "{{ downloads }}"
|
||||
run_once: "{{ download_run_once|bool }}"
|
||||
|
||||
- name: Download items
|
||||
get_url:
|
||||
@@ -11,6 +12,7 @@
|
||||
owner: "{{ item.owner|default(omit) }}"
|
||||
mode: "{{ item.mode|default(omit) }}"
|
||||
with_items: "{{ downloads }}"
|
||||
run_once: "{{ download_run_once|bool }}"
|
||||
|
||||
- name: Extract archives
|
||||
unarchive:
|
||||
@@ -21,6 +23,7 @@
|
||||
copy: no
|
||||
when: "{{item.unarchive is defined and item.unarchive == True}}"
|
||||
with_items: "{{ downloads }}"
|
||||
run_once: "{{ download_run_once|bool }}"
|
||||
|
||||
- name: Fix permissions
|
||||
file:
|
||||
@@ -30,3 +33,4 @@
|
||||
mode: "{{ item.mode|default(omit) }}"
|
||||
when: "{{item.unarchive is not defined or item.unarchive == False}}"
|
||||
with_items: "{{ downloads }}"
|
||||
run_once: "{{ download_run_once|bool }}"
|
||||
|
||||
Reference in New Issue
Block a user