update to latest 2.26.0 kubespray version and add dns zones settings to coredns

This commit is contained in:
2024-12-14 21:56:19 +03:00
parent be9c8a28fd
commit 4294f52703
368 changed files with 37761 additions and 2942 deletions

View File

@@ -5,7 +5,7 @@
shell: "{{ image_info_command }}"
register: docker_images
changed_when: false
check_mode: no
check_mode: false
when: not download_always_pull
- name: Check_pull_required | Set pull_required if the desired image is not yet loaded

View File

@@ -26,12 +26,12 @@
- name: Download_container | Determine if image is in cache
stat:
path: "{{ image_path_cached }}"
get_attributes: no
get_checksum: no
get_mime: no
get_attributes: false
get_checksum: false
get_mime: false
delegate_to: localhost
connection: local
delegate_facts: no
delegate_facts: false
register: cache_image
changed_when: false
become: false
@@ -57,7 +57,7 @@
- name: Download_container | Download image if required
command: "{{ image_pull_command_on_localhost if download_localhost else image_pull_command }} {{ image_reponame }}"
delegate_to: "{{ download_delegate if download_run_once else inventory_hostname }}"
delegate_facts: yes
delegate_facts: true
run_once: "{{ download_run_once }}"
register: pull_task_result
until: pull_task_result is succeeded
@@ -72,7 +72,7 @@
- name: Download_container | Save and compress image
shell: "{{ image_save_command_on_localhost if download_localhost else image_save_command }}" # noqa command-instead-of-shell - image_save_command_on_localhost contains a pipe, therefore requires shell
delegate_to: "{{ download_delegate }}"
delegate_facts: no
delegate_facts: false
register: container_save_status
failed_when: container_save_status.stderr
run_once: true
@@ -99,7 +99,7 @@
dest: "{{ image_path_final }}"
use_ssh_args: true
mode: push
delegate_facts: no
delegate_facts: false
register: upload_image
failed_when: not upload_image
until: upload_image is succeeded

View File

@@ -22,15 +22,15 @@
file:
path: "{{ download.dest | dirname }}"
owner: "{{ download.owner | default(omit) }}"
mode: 0755
mode: "0755"
state: directory
recurse: yes
recurse: true
- name: Download_file | Create local cache directory
file:
path: "{{ file_path_cached | dirname }}"
state: directory
recurse: yes
recurse: true
delegate_to: localhost
connection: local
delegate_facts: false
@@ -45,7 +45,7 @@
file:
path: "{{ file_path_cached | dirname }}"
state: directory
recurse: yes
recurse: true
delegate_to: "{{ download_delegate }}"
delegate_facts: false
run_once: true

View File

@@ -5,7 +5,7 @@
dest: "{{ download.dest | dirname }}"
owner: "{{ download.owner | default(omit) }}"
mode: "{{ download.mode | default(omit) }}"
copy: no
copy: false
extra_opts: "{{ download.unarchive_extra_opts | default(omit) }}"
when:
- download.unarchive | default(false)

View File

@@ -62,14 +62,14 @@
register: docker_images
failed_when: false
changed_when: false
check_mode: no
check_mode: false
when: download_container
- name: Prep_download | Create staging directory on remote node
file:
path: "{{ local_release_dir }}/images"
state: directory
mode: 0755
mode: "0755"
owner: "{{ ansible_ssh_user | default(ansible_user_id) }}"
when:
- ansible_os_family not in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
@@ -78,10 +78,10 @@
file:
path: "{{ download_cache_dir }}/images"
state: directory
mode: 0755
mode: "0755"
delegate_to: localhost
connection: local
delegate_facts: no
delegate_facts: false
run_once: true
become: false
when:

View File

@@ -1,11 +1,4 @@
---
- name: Prep_kubeadm_images | Check kubeadm version matches kubernetes version
fail:
msg: "Kubeadm version {{ kubeadm_version }} do not matches kubernetes {{ kube_version }}"
when:
- not skip_downloads | default(false)
- not kubeadm_version == downloads.kubeadm.version
- name: Prep_kubeadm_images | Download kubeadm binary
include_tasks: "download_file.yml"
vars:
@@ -18,7 +11,7 @@
template:
src: "kubeadm-images.yaml.j2"
dest: "{{ kube_config_dir }}/kubeadm-images.yaml"
mode: 0644
mode: "0644"
when:
- not skip_kubeadm_images | default(false)
@@ -26,7 +19,7 @@
copy:
src: "{{ downloads.kubeadm.dest }}"
dest: "{{ bin_dir }}/kubeadm"
mode: 0755
mode: "0755"
remote_src: true
- name: Prep_kubeadm_images | Set kubeadm binary permissions