diff --git a/roles/kubernetes/preinstall/defaults/main.yml b/roles/kubernetes/preinstall/defaults/main.yml index e1798d9c1..147039b08 100644 --- a/roles/kubernetes/preinstall/defaults/main.yml +++ b/roles/kubernetes/preinstall/defaults/main.yml @@ -136,3 +136,7 @@ redhat_os_family_extensions: - "openEuler" - "UnionTech" - "UniontechOS" + +# Extending some distributions into the debian os family +debian_os_family_extensions: + - "UnionTech OS Server 20" diff --git a/roles/kubernetes/preinstall/tasks/0040-set_facts.yml b/roles/kubernetes/preinstall/tasks/0020-set_facts.yml similarity index 97% rename from roles/kubernetes/preinstall/tasks/0040-set_facts.yml rename to roles/kubernetes/preinstall/tasks/0020-set_facts.yml index 716d4c936..ca430cac4 100644 --- a/roles/kubernetes/preinstall/tasks/0040-set_facts.yml +++ b/roles/kubernetes/preinstall/tasks/0020-set_facts.yml @@ -6,7 +6,7 @@ tags: - facts -- name: Set os_family fact for Kylin Linux Advanced Server and openEuler +- name: Set os_family fact for other redhat-based operating systems set_fact: ansible_os_family: "RedHat" ansible_distribution_major_version: "8" @@ -14,6 +14,13 @@ tags: - facts +- name: Set os_family fact for other debian-based operating systems + set_fact: + ansible_os_family: "Debian" + when: ansible_distribution in debian_os_family_extensions + tags: + - facts + - name: check if booted with ostree stat: path: /run/ostree-booted diff --git a/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml b/roles/kubernetes/preinstall/tasks/0040-verify-settings.yml similarity index 100% rename from roles/kubernetes/preinstall/tasks/0020-verify-settings.yml rename to roles/kubernetes/preinstall/tasks/0040-verify-settings.yml diff --git a/roles/kubernetes/preinstall/tasks/main.yml b/roles/kubernetes/preinstall/tasks/main.yml index 51c0352b8..95aa4c638 100644 --- a/roles/kubernetes/preinstall/tasks/main.yml +++ b/roles/kubernetes/preinstall/tasks/main.yml @@ -5,17 +5,17 @@ - not dns_late - disable_swap -- import_tasks: 0020-verify-settings.yml +- import_tasks: 0020-set_facts.yml + tags: + - resolvconf + - facts + +- import_tasks: 0040-verify-settings.yml when: - not dns_late tags: - asserts -- import_tasks: 0040-set_facts.yml - tags: - - resolvconf - - facts - - import_tasks: 0050-create_directories.yml when: - not dns_late