From 1712314fabf47b5ad79897c04e4f3627a62c2e68 Mon Sep 17 00:00:00 2001 From: Andrey Zhelnin Date: Fri, 7 Dec 2018 14:41:30 +0100 Subject: [PATCH] Setting host_architecture var (#3846) Setting host_architecture to allow etcd upgrade working through: ansible-playbook -b -i inventory/sample/hosts.ini cluster.yml --tags=etcd (on other case host_architecture is missing) --- roles/etcd/tasks/main.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/roles/etcd/tasks/main.yml b/roles/etcd/tasks/main.yml index 966c555d5..88f78be00 100644 --- a/roles/etcd/tasks/main.yml +++ b/roles/etcd/tasks/main.yml @@ -1,4 +1,18 @@ --- +- 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: