<commit_before>---
- name: prep_kubeadm_images | Download kubeadm binary
  include_tasks: "download_file.yml"
  vars:
    download: "{{ download_defaults | combine(downloads.kubeadm) }}"
  when:
    - not skip_downloads | default(false)
    - downloads.kubeadm.enabled

- name: prep_kubeadm_images | Create kubeadm config
  template:
    src: "kubeadm-images.yaml.j2"
    dest: "{{ kube_config_dir }}/kubeadm-images.yaml"
  when:
    - not skip_kubeadm_images|default(false)

- name: prep_kubeadm_images | Copy kubeadm binary from download dir to system path
  synchronize:
    src: "{{ local_release_dir }}/kubeadm-{{ kubeadm_version }}-{{ image_arch }}"
    dest: "{{ bin_dir }}/kubeadm"
    compress: no
    perms: yes
    owner: no
    group: no
  delegate_to: "{{ inventory_hostname }}"

- name: prep_kubeadm_images | Set kubeadm binary permissions
  file:
    path: "{{ bin_dir }}/kubeadm"
    mode: "0755"
    state: file

- name: prep_kubeadm_images | Generate list of required images
  shell: "set -o pipefail && {{ bin_dir }}/kubeadm config images list --config={{ kube_config_dir }}/kubeadm-images.yaml | grep -v coredns"<commit_msg>Ignore pause from kubeadm config images list (#6689)<commit_after>---
- name: prep_kubeadm_images | Download kubeadm binary
  include_tasks: "download_file.yml"
  vars:
    download: "{{ download_defaults | combine(downloads.kubeadm) }}"
  when:
    - not skip_downloads | default(false)
    - downloads.kubeadm.enabled

- name: prep_kubeadm_images | Create kubeadm config
  template:
    src: "kubeadm-images.yaml.j2"
    dest: "{{ kube_config_dir }}/kubeadm-images.yaml"
  when:
    - not skip_kubeadm_images|default(false)

- name: prep_kubeadm_images | Copy kubeadm binary from download dir to system path
  synchronize:
    src: "{{ local_release_dir }}/kubeadm-{{ kubeadm_version }}-{{ image_arch }}"
    dest: "{{ bin_dir }}/kubeadm"
    compress: no
    perms: yes
    owner: no
    group: no
  delegate_to: "{{ inventory_hostname }}"

- name: prep_kubeadm_images | Set kubeadm binary permissions
  file:
    path: "{{ bin_dir }}/kubeadm"
    mode: "0755"
    state: file

- name: prep_kubeadm_images | Generate list of required images
  shell: "set -o pipefail && {{ bin_dir }}/kubeadm config images list --config={{ kube_config_dir }}/kubeadm-images.yaml | grep -Ev 'coredns|pause'"
{'fraction_non_alphanumeric': 0.1232876712328767, 'fraction_numerical': 0.0059931506849315065, 'mean_word_length': 3.7889344262295084, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6603990', 'n_tokens_mistral': 866, 'n_tokens_neox': 857, 'n_words': 200}