2015-10-04 04:19:50 +08:00
|
|
|
---
|
2018-01-29 19:37:48 +08:00
|
|
|
- include_tasks: download_prep.yml
|
2017-04-26 20:11:13 +08:00
|
|
|
when:
|
2017-10-19 16:17:11 +08:00
|
|
|
- not skip_downloads|default(false)
|
2015-12-31 23:05:25 +08:00
|
|
|
|
2019-05-01 16:10:56 +08:00
|
|
|
- include_tasks: kubeadm_images.yml
|
|
|
|
when:
|
|
|
|
- kube_version is version('v1.11.0', '>=')
|
|
|
|
- not skip_downloads|default(false)
|
2019-06-04 19:35:02 +08:00
|
|
|
- not skip_kubeadm_images|default(false)
|
2019-05-01 16:10:56 +08:00
|
|
|
- inventory_hostname in groups['kube-master']
|
|
|
|
|
2019-05-16 15:27:43 +08:00
|
|
|
- name: Set kubeadm_images
|
|
|
|
set_fact:
|
2019-05-01 16:10:56 +08:00
|
|
|
kubeadm_images: {}
|
|
|
|
when:
|
|
|
|
- kubeadm_images is not defined
|
|
|
|
|
2017-10-19 16:17:11 +08:00
|
|
|
- name: "Download items"
|
2019-04-10 17:04:16 +08:00
|
|
|
include_tasks: "{{ include_file }}"
|
2017-10-19 16:17:11 +08:00
|
|
|
vars:
|
|
|
|
download: "{{ download_defaults | combine(item.value) }}"
|
2019-04-10 17:04:16 +08:00
|
|
|
include_file: "download_{% if download.container %}container{% else %}file{% endif %}.yml"
|
2019-05-01 16:10:56 +08:00
|
|
|
with_dict: "{{ downloads | combine(kubeadm_images) }}"
|
2017-04-26 20:11:13 +08:00
|
|
|
when:
|
2017-10-19 16:17:11 +08:00
|
|
|
- not skip_downloads|default(false)
|
2017-10-25 03:49:36 +08:00
|
|
|
- item.value.enabled
|
2018-08-04 18:01:35 +08:00
|
|
|
- (not (item.value.container|default(False))) or (item.value.container and download_container)
|
2015-12-31 23:05:25 +08:00
|
|
|
|
2019-05-01 16:10:56 +08:00
|
|
|
- name: "Sync items"
|
|
|
|
include_tasks: "{{ include_file }}"
|
2017-10-19 16:17:11 +08:00
|
|
|
vars:
|
|
|
|
download: "{{ download_defaults | combine(item.value) }}"
|
2019-05-01 16:10:56 +08:00
|
|
|
include_file: "sync_{% if download.container %}container{% else %}file{% endif %}.yml"
|
|
|
|
with_dict: "{{ downloads | combine(kubeadm_images) }}"
|
2017-04-26 20:11:13 +08:00
|
|
|
when:
|
2017-10-19 16:17:11 +08:00
|
|
|
- not skip_downloads|default(false)
|
2017-10-25 03:49:36 +08:00
|
|
|
- item.value.enabled
|
2017-10-19 16:17:11 +08:00
|
|
|
- download_run_once
|
2018-04-11 17:05:33 +08:00
|
|
|
- group_names | intersect(download.groups) | length
|