c12s-kubespray/roles/download/tasks/main.yml

40 lines
1.2 KiB
YAML
Raw Normal View History

2015-10-03 20:19:50 +00:00
---
- include_tasks: download_prep.yml
when:
- not skip_downloads|default(false)
2015-12-31 15:05:25 +00:00
- include_tasks: kubeadm_images.yml
when:
- kube_version is version('v1.11.0', '>=')
- not skip_downloads|default(false)
- inventory_hostname in groups['kube-master']
2019-05-16 07:27:43 +00: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 15:05:25 +00: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 09:05:33 +00:00
- group_names | intersect(download.groups) | length