From 818dc3903007f059655dd5cb87cc2f1a1131ebe0 Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Fri, 30 Nov 2018 11:08:23 +0100 Subject: [PATCH] OSBS: refactor nodes label tasks for multi arch support Signed-off-by: Clement Verna --- playbooks/groups/osbs-cluster.yml | 38 +++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/playbooks/groups/osbs-cluster.yml b/playbooks/groups/osbs-cluster.yml index f87384986e..2c8c4ab489 100644 --- a/playbooks/groups/osbs-cluster.yml +++ b/playbooks/groups/osbs-cluster.yml @@ -350,7 +350,22 @@ - osbs-orchestrator-namespace -- name: Add the worker/orchestrator labels to the nodes +- name: Add the orchestrator labels to the nodes + hosts: osbs-masters-stg[0]:osbs-masters[0] + tags: + - osbs-labels-nodes + tasks: + - name: Add the orchestrator labels to the nodes + command: "oc -n {{ osbs_namespace }} label nodes {{ item }} orchestrator=true --overwrite" + loop: "{{ groups['osbs-nodes-stg'] }}" + when: env == "staging" + + - name: Add the orchestrator labels to the nodes + command: "oc -n {{ osbs_namespace }} label nodes {{ item }} orchestrator=true --overwrite" + loop: "{{ groups['osbs-nodes'] }}" + when: env == "production" + +- name: Add the worker labels to the nodes x86_64 hosts: osbs-masters-stg[0]:osbs-masters[0] tags: - osbs-labels-nodes @@ -359,20 +374,23 @@ command: "oc -n {{ osbs_worker_namespace }} label nodes {{ item }} worker=true --overwrite" loop: "{{ groups['osbs-nodes-stg'] }}" when: env == "staging" - - - name: Add the orchestrator labels to the nodes - command: "oc -n {{ osbs_namespace }} label nodes {{ item }} orchestrator=true --overwrite" - loop: "{{ groups['osbs-nodes-stg'] }}" - when: env == "staging" - - name: Add the worker label command: "oc -n {{ osbs_worker_namespace }} label nodes {{ item }} worker=true --overwrite" loop: "{{ groups['osbs-nodes'] }}" when: env == "production" - - name: Add the orchestrator labels to the nodes - command: "oc -n {{ osbs_namespace }} label nodes {{ item }} orchestrator=true --overwrite" - loop: "{{ groups['osbs-nodes'] }}" +- name: Add the worker labels to the nodes aarch64 + hosts: osbs-aarch64-masters-stg[0] + tags: + - osbs-labels-nodes + tasks: + - name: Add the worker label + command: "oc -n {{ osbs_worker_namespace }} label nodes {{ item }} worker=true --overwrite" + loop: "{{ groups['osbs-aarch64-nodes-stg'] }}" + when: env == "staging" + - name: Add the worker label + command: "oc -n {{ osbs_worker_namespace }} label nodes {{ item }} worker=true --overwrite" + loop: "{{ groups['osbs-aarch64-nodes'] }}" when: env == "production" - name: setup reactor config secret in orchestrator namespace