mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-24 22:46:06 -03:30
Fix kubespray flatcar ansible_os_family and ansible_distribution (#8181)
Closes https://github.com/kubernetes-sigs/kubespray/issues/8028 Signed-off-by: Iago Santos <iago.santos.pardo@adfinis.com>
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
fail:
|
||||
msg: "{{ ansible_distribution }} is not supported by containerd."
|
||||
when:
|
||||
- not ansible_distribution in ["CentOS", "OracleLinux", "RedHat", "Ubuntu", "Debian", "Fedora", "AlmaLinux", "Amazon", "Flatcar Container Linux by Kinvolk"]
|
||||
- not ansible_distribution in ["CentOS", "OracleLinux", "RedHat", "Ubuntu", "Debian", "Fedora", "AlmaLinux", "Amazon", "Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||
|
||||
- name: gather os specific variables
|
||||
include_vars: "{{ item }}"
|
||||
@@ -53,7 +53,7 @@
|
||||
- not is_ostree
|
||||
|
||||
- include_tasks: containerd_repo.yml
|
||||
when: not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk"))
|
||||
when: not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk") or (ansible_distribution == "Flatcar"))
|
||||
|
||||
- name: Create containerd service systemd directory if it doesn't exist
|
||||
file:
|
||||
@@ -116,7 +116,7 @@
|
||||
delay: "{{ retry_stagger | d(3) }}"
|
||||
notify: restart containerd
|
||||
when:
|
||||
- not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk"))
|
||||
- not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk") or (ansible_distribution == "Flatcar"))
|
||||
- containerd_package_info.pkgs|length > 0
|
||||
|
||||
- include_role: # noqa unnamed-task
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
service:
|
||||
name: docker.socket
|
||||
state: restarted
|
||||
when: ansible_os_family in ['Flatcar Container Linux by Kinvolk'] or is_fedora_coreos
|
||||
when: ansible_os_family in ['Flatcar', 'Flatcar Container Linux by Kinvolk'] or is_fedora_coreos
|
||||
|
||||
- name: Docker | reload docker
|
||||
service:
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
delay: "{{ retry_stagger | d(3) }}"
|
||||
notify: restart docker
|
||||
when:
|
||||
- not ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
|
||||
- not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||
- not is_ostree
|
||||
- docker_package_info.pkgs|length > 0
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
register: docker_service_file
|
||||
notify: restart docker
|
||||
when:
|
||||
- not ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
|
||||
- not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||
- not is_fedora_coreos
|
||||
|
||||
- name: Write docker options systemd drop-in
|
||||
|
||||
Reference in New Issue
Block a user