Skip to content

Commit

Permalink
Get the new cli (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
betoredhat authored Nov 17, 2023
1 parent 81d6ff3 commit 1a96d96
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions roles/acm_hypershift/tasks/download-cli.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
- name: Get route for hypershift-cli
- name: Get route for hcp-cli
community.kubernetes.k8s_info:
kind: Route
name: hypershift-cli-download
name: hcp-cli-download
namespace: multicluster-engine
register: ah_route
until: ah_route.resources | length
retries: 10
delay: 10

- name: Download hypershift cli tarball, ignoring the certificate
- name: Download hcp cli tarball, ignoring the certificate
vars:
ah_arch: amd64
unarchive:
src: "https://{{ ah_route.resources[0].spec.host }}/linux/{{ ah_arch }}/hypershift.tar.gz"
src: "https://{{ ah_route.resources[0].spec.host }}/linux/{{ ah_arch }}/hcp.tar.gz"
dest: "{{ ah_tmp_dir.path }}"
mode: 0755
remote_src: true
Expand All @@ -23,16 +23,17 @@
delay: 10
until: result is not failed

- name: Get hypershift cli version
- name: Get hcp cli version
shell:
cmd: >
{{ ah_tmp_dir.path }}/hypershift version
{{ ah_tmp_dir.path }}/hcp version
register: result

- name: Print hypershift cli version
- name: Print hcp cli version
debug:
var: result.stdout

- name: Set hypershift cli path
- name: Set hcp cli path
set_fact:
ah_cli_path: "{{ ah_tmp_dir.path }}/hypershift"
ah_cli_path: "{{ ah_tmp_dir.path }}/hcp"
...

0 comments on commit 1a96d96

Please sign in to comment.