Decouple kubespray-defaults from download (#10626)
* Decouple role kubespray-defaults from download
Avoids doing re-importing the download role on every invocation of
kubespray-defaults (and skipping everything).
This has a measurable effect on playbook performance.
* Update docs refering to moved download defaults
echo"The version of kubernetes is different between main.yml(${version_from_default}) and README.md(${version_from_readme})."
echo"The version of kubernetes is different between main.yml(${version_from_default}) and README.md(${version_from_readme})."
@ -17,7 +17,7 @@ fi
for component in $(echo${TARGET_COMPONENTS});do
for component in $(echo${TARGET_COMPONENTS});do
echo checking ${component}..
echo checking ${component}..
version_from_default=$(grep "^$(echo${component}| sed s/"-"/"_"/g)_version:" ./roles/download/defaults/main/main.yml | awk '{print $2}'| sed s/\"//g | sed s/^v//)
version_from_default=$(grep "^$(echo${component}| sed s/"-"/"_"/g)_version:" ./roles/kubespray-defaults/defaults/main/download.yml | awk '{print $2}'| sed s/\"//g | sed s/^v//)
if["${version_from_default}"=""];then
if["${version_from_default}"=""];then
version_from_default=$(grep "^$(echo${component}| sed s/"-"/"_"/g)_version:" ./roles/kubernetes/node/defaults/main.yml | awk '{print $2}'| sed s/\"//g | sed s/^v//)
version_from_default=$(grep "^$(echo${component}| sed s/"-"/"_"/g)_version:" ./roles/kubernetes/node/defaults/main.yml | awk '{print $2}'| sed s/\"//g | sed s/^v//)