OSBS: get the orchestrator token from the cluster instead of the secret repo
Signed-off-by: Clement Verna <cverna@tutanota.com>
This commit is contained in:
parent
818dc39030
commit
2ac6d14f24
1 changed files with 21 additions and 1 deletions
|
@ -431,6 +431,19 @@
|
||||||
tags:
|
tags:
|
||||||
- osbs-orchestrator-namespace
|
- osbs-orchestrator-namespace
|
||||||
|
|
||||||
|
- name: Save orchestrator token x86_64
|
||||||
|
hosts: osbs-masters-stg[0]:osbs-masters[0]
|
||||||
|
tasks:
|
||||||
|
- name: get orchestrator service account token
|
||||||
|
command: "oc -n {{ osbs_worker_namespace }} sa get-token orchestrator"
|
||||||
|
register: orchestator_token_x86_64
|
||||||
|
- name: save the token locally
|
||||||
|
local_action: >
|
||||||
|
copy
|
||||||
|
content="{{ orchestator_token_x86_64.stdout }}"
|
||||||
|
dest=/tmp/.orchestator-token-x86_64
|
||||||
|
mode=0400
|
||||||
|
|
||||||
- name: setup orchestrator token for x86_64-osbs
|
- name: setup orchestrator token for x86_64-osbs
|
||||||
hosts: osbs-masters-stg[0]:osbs-masters[0]
|
hosts: osbs-masters-stg[0]:osbs-masters[0]
|
||||||
vars_files:
|
vars_files:
|
||||||
|
@ -441,8 +454,15 @@
|
||||||
- role: osbs-secret
|
- role: osbs-secret
|
||||||
osbs_secret_name: x86-64-orchestrator
|
osbs_secret_name: x86-64-orchestrator
|
||||||
osbs_secret_files:
|
osbs_secret_files:
|
||||||
- source: "{{ private }}/files/osbs/{{ env }}/x86-64-osbs-orchestrator"
|
- source: "/tmp/.orchestator-token-x86_64"
|
||||||
dest: token
|
dest: token
|
||||||
|
|
||||||
|
post_tasks:
|
||||||
|
- name: Delete the temporary secret file
|
||||||
|
local_action: >
|
||||||
|
file
|
||||||
|
state=absent
|
||||||
|
path="/tmp/.orchestator-token-x86_64"
|
||||||
tags:
|
tags:
|
||||||
- osbs-orchestrator-namespace
|
- osbs-orchestrator-namespace
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue