From d90144d2190009f8bd121cb8f773a9209500f034 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 1 Jan 2022 20:19:56 +0100 Subject: in-place variable cooking --- roles/cloud/install/tasks/hcloud.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'roles/cloud/install/tasks/hcloud.yml') diff --git a/roles/cloud/install/tasks/hcloud.yml b/roles/cloud/install/tasks/hcloud.yml index b716f4ac..cd46d348 100644 --- a/roles/cloud/install/tasks/hcloud.yml +++ b/roles/cloud/install/tasks/hcloud.yml @@ -6,7 +6,7 @@ url: "https://api.hetzner.cloud/v1/ssh_keys" method: GET headers: - Authorization: "Bearer {{ install_cooked.cloud.credentials.token }}" + Authorization: "Bearer {{ install.cloud.credentials.token }}" status_code: 200 register: sshkeys @@ -14,10 +14,10 @@ delegate_to: localhost check_mode: no uri: - url: "https://api.hetzner.cloud/v1/servers?name={{ install_cooked.cloud.server_name | default(inventory_hostname) }}" + url: "https://api.hetzner.cloud/v1/servers?name={{ install.cloud.server_name | default(inventory_hostname) }}" method: GET headers: - Authorization: "Bearer {{ install_cooked.cloud.credentials.token }}" + Authorization: "Bearer {{ install.cloud.credentials.token }}" status_code: 200 register: serverstatus @@ -48,7 +48,7 @@ method: POST body: "{{ {'type': 'linux64', 'ssh_keys': (sshkeys.json.ssh_keys | map(attribute='id') | list) } | to_nice_json }}" headers: - Authorization: "Bearer {{ install_cooked.cloud.credentials.token }}" + Authorization: "Bearer {{ install.cloud.credentials.token }}" Content-Type: "application/json" status_code: 201 @@ -62,7 +62,7 @@ url: "https://api.hetzner.cloud/v1/servers/{{ serverstatus.json.servers[0].id }}/actions/reset" method: POST headers: - Authorization: "Bearer {{ install_cooked.cloud.credentials.token }}" + Authorization: "Bearer {{ install.cloud.credentials.token }}" status_code: 201 ### TODO: would be nice to get the SSH host key from robot -- cgit v1.2.3