kubespray/roles/download/tasks/main.yml

41 lines
1.3 KiB
YAML
Raw Normal View History

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