Remove obsolete "Flatcar Container Linux by Kinvolk" fact checks (#13528)

Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
This commit is contained in:
Ali Afsharzadeh
2026-09-18 10:12:42 +00:00
committed by GitHub
parent 66f8da3f04
commit 0fd9672b0c
27 changed files with 33 additions and 37 deletions
@@ -116,7 +116,6 @@ containerd_supported_distributions:
- "Rocky"
- "Amazon"
- "Flatcar"
- "Flatcar Container Linux by Kinvolk"
- "Suse"
- "openSUSE Leap"
- "openSUSE Tumbleweed"
@@ -10,7 +10,7 @@
service:
name: docker.socket
state: restarted
when: ansible_facts['os_family'] in ['Flatcar', 'Flatcar Container Linux by Kinvolk'] or is_fedora_coreos
when: ansible_facts['os_family'] == 'Flatcar' or is_fedora_coreos
listen: Restart docker
+1 -1
View File
@@ -131,7 +131,7 @@
delay: "{{ retry_stagger }}"
notify: Restart docker
when:
- not ansible_facts['os_family'] in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
- ansible_facts['os_family'] != "Flatcar"
- not is_ostree
- docker_package_info.pkgs | length > 0
@@ -61,7 +61,7 @@
- "{{ docker_packages_list }}"
- "{{ containerd_package }}"
when:
- not ansible_facts['os_family'] in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
- ansible_facts['os_family'] != "Flatcar"
- not is_ostree
- docker_packages_list | length > 0
@@ -21,7 +21,7 @@
register: docker_service_file
notify: Restart docker
when:
- not ansible_facts['os_family'] in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
- ansible_facts['os_family'] != "Flatcar"
- not is_fedora_coreos
- name: Write docker options systemd drop-in
@@ -14,7 +14,6 @@
- name: Runc | Uninstall runc package managed by package manager
when:
- not is_ostree
- ansible_facts['distribution'] != "Flatcar Container Linux by Kinvolk"
- ansible_facts['distribution'] != "Flatcar"
block:
- name: Runc | Remove package
+1 -1
View File
@@ -16,7 +16,7 @@
name: skopeo
state: absent
when:
- not (is_ostree or (ansible_facts['distribution'] == "Flatcar Container Linux by Kinvolk") or (ansible_facts['distribution'] == "Flatcar"))
- not (is_ostree or ansible_facts['distribution'] == "Flatcar")
ignore_errors: true # noqa ignore-errors
- name: Skopeo | Download skopeo binary
@@ -76,7 +76,7 @@
vars:
service_name: containerd.service
when:
- not (is_ostree or (ansible_facts['distribution'] == "Flatcar Container Linux by Kinvolk") or (ansible_facts['distribution'] == "Flatcar"))
- not (is_ostree or ansible_facts['distribution'] == "Flatcar")
- container_manager != "containerd"
- docker_installed.matched == 0
- containerd_installed.matched > 0
@@ -104,7 +104,7 @@
vars:
service_name: docker.service
when:
- not (is_ostree or (ansible_facts['distribution'] == "Flatcar Container Linux by Kinvolk") or (ansible_facts['distribution'] == "Flatcar"))
- not (is_ostree or ansible_facts['distribution'] == "Flatcar")
- container_manager != "docker"
- docker_installed.matched > 0
- ansible_facts.services[service_name]['state'] == 'running'
@@ -130,7 +130,7 @@
vars:
service_name: crio.service
when:
- not (is_ostree or (ansible_facts['distribution'] == "Flatcar Container Linux by Kinvolk") or (ansible_facts['distribution'] == "Flatcar"))
- not (is_ostree or ansible_facts['distribution'] == "Flatcar")
- container_manager != "crio"
- crio_installed.matched > 0
- ansible_facts.services[service_name]['state'] == 'running'
+1 -1
View File
@@ -72,7 +72,7 @@
mode: "0755"
owner: "{{ ansible_ssh_user | default(ansible_user_id) }}"
when:
- ansible_os_family not in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
- ansible_os_family != "Flatcar"
- name: Prep_download | Create local cache for files and images on control node
file:
+2 -2
View File
@@ -2,8 +2,8 @@
dependencies:
- role: adduser
user: "{{ addusers.etcd }}"
when: not (ansible_facts['os_family'] in ["Flatcar", "Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_fedora_coreos)
when: not (ansible_facts['os_family'] in ["Flatcar", "ClearLinux"] or is_fedora_coreos)
- role: adduser
user: "{{ addusers.kube }}"
when: not (ansible_facts['os_family'] in ["Flatcar", "Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_fedora_coreos)
when: not (ansible_facts['os_family'] in ["Flatcar", "ClearLinux"] or is_fedora_coreos)
- role: etcd_defaults
+2 -2
View File
@@ -6,7 +6,7 @@
/usr/local/share/ca-certificates/etcd-ca.crt
{%- elif ansible_facts['os_family'] == "RedHat" -%}
/etc/pki/ca-trust/source/anchors/etcd-ca.crt
{%- elif ansible_facts['os_family'] in ["Flatcar", "Flatcar Container Linux by Kinvolk"] -%}
{%- elif ansible_facts['os_family'] == "Flatcar" -%}
/etc/ssl/certs/etcd-ca.pem
{%- elif ansible_facts['os_family'] == "Suse" -%}
/etc/pki/trust/anchors/etcd-ca.pem
@@ -26,7 +26,7 @@
- name: Gen_certs | update ca-certificates (Debian/Ubuntu/SUSE/Flatcar) # noqa no-handler
command: update-ca-certificates
when: etcd_ca_cert.changed and ansible_facts['os_family'] in ["Debian", "Flatcar", "Flatcar Container Linux by Kinvolk", "Suse"]
when: etcd_ca_cert.changed and ansible_facts['os_family'] in ["Debian", "Flatcar", "Suse"]
- name: Gen_certs | update ca-certificates (RedHat) # noqa no-handler
command: update-ca-trust extract
+1 -1
View File
@@ -21,7 +21,7 @@
- name: Helm | Install PyYaml [flatcar]
include_tasks: pyyaml-flatcar.yml
when: ansible_facts['os_family'] in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
when: ansible_facts['os_family'] == "Flatcar"
- name: Helm | Download helm
include_tasks: "../../../download/tasks/download_file.yml"
+1 -1
View File
@@ -5,6 +5,6 @@ dependencies:
user: "{{ addusers.etcd }}"
when:
- etcd_deployment_type == "kubeadm"
- not (ansible_facts['os_family'] in ["Flatcar", "Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_fedora_coreos)
- not (ansible_facts['os_family'] in ["Flatcar", "ClearLinux"] or is_fedora_coreos)
- role: network_plugin/calico_defaults
- role: etcd_defaults
@@ -87,7 +87,6 @@ supported_os_distributions:
- 'Ubuntu'
- 'Debian'
- 'Flatcar'
- 'Flatcar Container Linux by Kinvolk'
- 'Suse'
- 'openSUSE Leap'
- 'openSUSE Tumbleweed'
@@ -107,7 +106,7 @@ redhat_os_family_extensions:
- "UniontechOS"
# Sets DNSStubListener=no, useful if you get "0.0.0.0:53: bind: address already in use"
systemd_resolved_disable_stub_listener: "{{ ansible_facts['os_family'] in ['Flatcar', 'Flatcar Container Linux by Kinvolk'] }}"
systemd_resolved_disable_stub_listener: "{{ ansible_facts['os_family'] == 'Flatcar' }}"
# Used to disable File Access Policy Daemon service.
# If service is enabled, the CNI plugin installation will fail
@@ -1,7 +1,7 @@
---
- name: Preinstall | apply resolvconf cloud-init
command: /usr/bin/coreos-cloudinit --from-file {{ resolveconf_cloud_init_conf }}
when: ansible_facts['os_family'] in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
when: ansible_facts['os_family'] == "Flatcar"
listen: Preinstall | propagate resolvconf to k8s components
- name: Preinstall | reload NetworkManager
@@ -89,12 +89,12 @@
{%- if resolvconf | bool -%}/etc/resolvconf/resolv.conf.d/base{%- endif -%}
head: >-
{%- if resolvconf | bool -%}/etc/resolvconf/resolv.conf.d/head{%- endif -%}
when: ansible_facts['os_family'] not in ["Flatcar", "Flatcar Container Linux by Kinvolk"] and not is_fedora_coreos
when: ansible_facts['os_family'] != "Flatcar" and not is_fedora_coreos
- name: Target temporary resolvconf cloud init file (Flatcar Container Linux by Kinvolk / Fedora CoreOS)
set_fact:
resolvconffile: /tmp/resolveconf_cloud_init_conf
when: ansible_facts['os_family'] in ["Flatcar", "Flatcar Container Linux by Kinvolk"] or is_fedora_coreos
when: ansible_facts['os_family'] == "Flatcar" or is_fedora_coreos
- name: Check if /etc/dhclient.conf exists
stat:
@@ -105,6 +105,6 @@
- name: Stop if download_localhost is enabled for Flatcar Container Linux
assert:
that: ansible_facts['os_family'] not in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
that: ansible_facts['os_family'] != "Flatcar"
msg: "download_run_once not supported for Flatcar Container Linux"
when: download_run_once or download_force_cache
@@ -1,7 +1,7 @@
---
- name: Create temporary resolveconf cloud init file
command: cp -f /etc/resolv.conf "{{ resolvconffile }}"
when: ansible_facts['os_family'] in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
when: ansible_facts['os_family'] == "Flatcar"
- name: Add domain/search/nameservers/options to resolv.conf
blockinfile:
@@ -45,7 +45,7 @@
- name: Get temporary resolveconf cloud init file content
command: cat {{ resolvconffile }}
register: cloud_config
when: ansible_facts['os_family'] in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
when: ansible_facts['os_family'] == "Flatcar"
- name: Persist resolvconf cloud init file
template:
@@ -54,4 +54,4 @@
owner: root
mode: "0644"
notify: Preinstall | propagate resolvconf to k8s components
when: ansible_facts['os_family'] in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
when: ansible_facts['os_family'] == "Flatcar"
@@ -32,7 +32,7 @@
mode: "0644"
when:
- disable_ipv6_dns
- ansible_facts['os_family'] not in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
- ansible_facts['os_family'] != "Flatcar"
tags:
- bootstrap_os
@@ -24,7 +24,7 @@
ntp_service_name: >-
{% if ntp_package == "chrony" -%}
chronyd
{%- elif ansible_facts['os_family'] in ["Flatcar", "Flatcar Container Linux by Kinvolk", "RedHat", "Suse"] -%}
{%- elif ansible_facts['os_family'] in ["Flatcar", "RedHat", "Suse"] -%}
ntpd
{%- else -%}
ntp
@@ -74,7 +74,7 @@
state: present
when:
- not is_fedora_coreos
- ansible_facts['os_family'] not in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
- ansible_facts['os_family'] != "Flatcar"
- name: Gather selinux facts
ansible.builtin.setup:
+2 -2
View File
@@ -83,7 +83,7 @@
- dns_mode != 'none'
- resolvconf_mode == 'host_resolvconf'
- dhclientconffile is defined
- ansible_facts['os_family'] not in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
- ansible_facts['os_family'] != "Flatcar"
tags:
- bootstrap_os
- resolvconf
@@ -94,7 +94,7 @@
- dns_mode != 'none'
- resolvconf_mode != 'host_resolvconf'
- dhclientconffile is defined
- ansible_facts['os_family'] not in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
- ansible_facts['os_family'] != "Flatcar"
tags:
- bootstrap_os
- resolvconf
@@ -78,7 +78,6 @@ ssl_ca_dirs_per_os_family:
Debian: &usr_share
- /usr/share/ca-certificates
Flatcar: *usr_share
'Flatcar Container Linux by Kinvolk': *usr_share
RedHat:
- /etc/pki/tls
- /etc/pki/ca-trust
@@ -9,5 +9,5 @@
systemd-networkd
{%- endif %}
state: restarted
when: not ansible_facts['os_family'] in ["Flatcar", "Flatcar Container Linux by Kinvolk"] and kube_network_plugin not in ['calico']
when: ansible_facts['os_family'] != "Flatcar" and kube_network_plugin not in ['calico']
listen: Macvlan | restart network
+1 -1
View File
@@ -53,7 +53,7 @@
notify: Macvlan | restart network
- name: Install macvlan config on Flatcar
when: ansible_facts['os_family'] in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
when: ansible_facts['os_family'] == "Flatcar"
block:
- name: Macvlan | Install service nat via gateway on Flatcar Container Linux
template:
+1 -1
View File
@@ -445,7 +445,7 @@
- name: Reset | Restart network
when:
- ansible_facts['os_family'] not in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
- ansible_facts['os_family'] != "Flatcar"
- reset_restart_network | bool
tags:
- services
+1 -1
View File
@@ -45,7 +45,7 @@
retries: "{{ pkg_install_retries }}"
delay: "{{ retry_stagger | random + 3 }}"
when:
- ansible_os_family not in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
- ansible_os_family != "Flatcar"
- not is_fedora_coreos
- item.packages != []
loop:
+1 -1
View File
@@ -55,7 +55,7 @@ pkgs:
iptables:
- "{{ ansible_os_family in ['Debian', 'RedHat', 'Suse'] }}"
iputils:
- "{{ not ansible_os_family in ['Flatcar', 'Flatcar Container Linux by Kinvolk', 'Debian'] }}"
- "{{ not ansible_os_family in ['Flatcar', 'Debian'] }}"
- "{{ main_access_ip is defined }}"
- "{{ ping_access_ip }}"
- "{{ not is_fedora_coreos }}"