mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-07 02:27:43 +03:00
Fix Ansible-lint error [E502] (#4743)
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
13f225e6ae
commit
73c2ff17dd
@@ -49,7 +49,8 @@
|
||||
when: download_run_once
|
||||
changed_when: false
|
||||
|
||||
- vars:
|
||||
- name: container_download | extract container names from list of kubeadm config images
|
||||
vars:
|
||||
kubeadm_images_list: "{{ result.stdout_lines }}"
|
||||
set_fact:
|
||||
kubeadm_image:
|
||||
@@ -66,7 +67,8 @@
|
||||
when: download_run_once
|
||||
register: result_images
|
||||
|
||||
- set_fact:
|
||||
- name: container_download | set kubeadm_images
|
||||
set_fact:
|
||||
kubeadm_images: "{{ result_images.results | map(attribute='ansible_facts.kubeadm_image') | list | items2dict }}"
|
||||
run_once: true
|
||||
when: download_run_once
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
- not skip_downloads|default(false)
|
||||
- inventory_hostname in groups['kube-master']
|
||||
|
||||
- set_fact:
|
||||
- name: Set kubeadm_images
|
||||
set_fact:
|
||||
kubeadm_images: {}
|
||||
when:
|
||||
- kubeadm_images is not defined
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
---
|
||||
- set_fact:
|
||||
- name: Set if containers should be pulled by digest
|
||||
set_fact:
|
||||
pull_by_digest: >-
|
||||
{%- if download.sha256 is defined and download.sha256 -%}true{%- else -%}false{%- endif -%}
|
||||
|
||||
- set_fact:
|
||||
- name: Set pull_args
|
||||
set_fact:
|
||||
pull_args: >-
|
||||
{%- if pull_by_digest %}{{ download.repo }}@sha256:{{ download.sha256 }}{%- else -%}{{ download.repo }}:{{ download.tag }}{%- endif -%}
|
||||
|
||||
@@ -19,7 +21,8 @@
|
||||
- not download_always_pull
|
||||
- group_names | intersect(download.groups) | length
|
||||
|
||||
- set_fact:
|
||||
- name: Set if pull is required per container
|
||||
set_fact:
|
||||
pull_required: >-
|
||||
{%- if pull_args in docker_images.stdout.split(',') %}false{%- else -%}true{%- endif -%}
|
||||
when:
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
tags:
|
||||
- facts
|
||||
|
||||
- set_fact:
|
||||
- name: container_download | Set file name of container tarballs
|
||||
set_fact:
|
||||
fname: "{{ local_release_dir }}/containers/{{ download.repo|regex_replace('/|\0|:', '_') }}:{{ download.tag|default(download.sha256)|regex_replace('/|\0|:', '_') }}.tar"
|
||||
run_once: true
|
||||
when:
|
||||
- download.enabled
|
||||
- download.container
|
||||
- download_run_once
|
||||
|
||||
tags:
|
||||
- facts
|
||||
|
||||
|
||||
Reference in New Issue
Block a user