diff --git a/roles/etcd/tasks/main.yml b/roles/etcd/tasks/main.yml index 07f27138e..a3236794f 100644 --- a/roles/etcd/tasks/main.yml +++ b/roles/etcd/tasks/main.yml @@ -1,19 +1,4 @@ --- -- name: set architecture_groups - set_fact: - architecture_groups: - x86_64: amd64 - aarch64: arm64 - -- name: ansible_architecture_rename - set_fact: - host_architecture: >- - {%- if ansible_architecture in architecture_groups -%} - {{ architecture_groups[ansible_architecture] }} - {%- else -%} - {{ ansible_architecture }} - {% endif %} - - include_tasks: check_certs.yml when: cert_management == "script" tags: diff --git a/roles/kubernetes/preinstall/tasks/0040-set_facts.yml b/roles/kubernetes/preinstall/tasks/0040-set_facts.yml index e0f1995d4..982916247 100644 --- a/roles/kubernetes/preinstall/tasks/0040-set_facts.yml +++ b/roles/kubernetes/preinstall/tasks/0040-set_facts.yml @@ -1,20 +1,4 @@ --- -- name: set architecture_groups - set_fact: - architecture_groups: - x86_64: amd64 - aarch64: arm64 - armv7l: arm - -- name: ansible_architecture_rename - set_fact: - host_architecture: >- - {%- if ansible_architecture in architecture_groups -%} - {{ architecture_groups[ansible_architecture] }} - {%- else -%} - {{ ansible_architecture }} - {% endif %} - - name: Force binaries directory for Container Linux by CoreOS and Flatcar set_fact: bin_dir: "/opt/bin" diff --git a/roles/kubespray-defaults/defaults/main.yaml b/roles/kubespray-defaults/defaults/main.yaml index 15738165d..bcaa97d7a 100644 --- a/roles/kubespray-defaults/defaults/main.yaml +++ b/roles/kubespray-defaults/defaults/main.yaml @@ -539,3 +539,14 @@ etcd_config_dir: /etc/ssl/etcd etcd_cert_dir: "{{ etcd_config_dir }}/ssl" typha_enabled: false + +_host_architecture_groups: + x86_64: amd64 + aarch64: arm64 + armv7l: arm +host_architecture: >- + {%- if ansible_architecture in _host_architecture_groups -%} + {{ _host_architecture_groups[ansible_architecture] }} + {%- else -%} + {{ ansible_architecture }} + {%- endif -%}