diff options
author | Christian Pointner <equinox@spreadspace.org> | 2019-09-08 02:24:27 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2019-09-08 02:24:27 +0200 |
commit | eb02a3f99dccb95bcb94eb428e7e19c88667f7e1 (patch) | |
tree | 7dc8d2b4f4289fe1f81aff48a76a29ae01b626a8 /roles/cloud/install/tasks/hcloud.yml | |
parent | major refactoring for cloud install (diff) |
some more refactoring and cleanup of cloud install roles
Diffstat (limited to 'roles/cloud/install/tasks/hcloud.yml')
-rw-r--r-- | roles/cloud/install/tasks/hcloud.yml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/roles/cloud/install/tasks/hcloud.yml b/roles/cloud/install/tasks/hcloud.yml index ca5435b8..646d80da 100644 --- a/roles/cloud/install/tasks/hcloud.yml +++ b/roles/cloud/install/tasks/hcloud.yml @@ -4,17 +4,17 @@ url: "https://api.hetzner.cloud/v1/ssh_keys" method: GET headers: - Authorization: "Bearer {{ install_cooked.cloud_credentials.token }}" + Authorization: "Bearer {{ install_cooked.cloud.credentials.token }}" status_code: 200 register: sshkeys delegate_to: localhost - name: retrieve server id and check if rescue mode is already active uri: - url: "https://api.hetzner.cloud/v1/servers?name={{ inventory_hostname }}" + url: "https://api.hetzner.cloud/v1/servers?name={{ install_cooked.cloud.server_name | default(inventory_hostname) }}" method: GET headers: - Authorization: "Bearer {{ install_cooked.cloud_credentials.token }}" + Authorization: "Bearer {{ install_cooked.cloud.credentials.token }}" status_code: 200 register: serverstatus delegate_to: localhost @@ -33,7 +33,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_cooked.cloud.credentials.token }}" Content-Type: "application/json" status_code: 201 delegate_to: localhost @@ -43,7 +43,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_cooked.cloud.credentials.token }}" status_code: 201 delegate_to: localhost |