add variable project_id
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
- name: Get id of cluster
|
||||
ansible.builtin.uri:
|
||||
url: https://api.scaleway.com/k8s/v1/regions/fr-par/clusters
|
||||
url: "https://api.scaleway.com/k8s/v1/regions/{{ region_k8s }}/clusters"
|
||||
status_code: 200
|
||||
return_content: yes
|
||||
method: GET
|
||||
@@ -10,12 +10,12 @@
|
||||
|
||||
- name: Download kubeconfig
|
||||
ansible.builtin.uri:
|
||||
url: "https://api.scaleway.com/k8s/v1/regions/fr-par/clusters/{{ item.id }}/kubeconfig?dl=1"
|
||||
url: "https://api.scaleway.com/k8s/v1/regions/{{ region_k8s }}/clusters/{{ item.id }}/kubeconfig?dl=1"
|
||||
status_code: 200
|
||||
dest: "{{ project_terraform }}/kubeconfig"
|
||||
method: GET
|
||||
headers:
|
||||
X-Auth-Token: "{{ scw_secret_key }}"
|
||||
when: item.name == "terraform-test"
|
||||
when: item.name == "{{ project_name }}"
|
||||
with_items: "{{ (output.content |from_json).clusters }}"
|
||||
|
Reference in New Issue
Block a user