Fix hetzner module (#14698)

pull/14707/head^2
Jack Ivanov 2 months ago committed by GitHub
parent ebf127dc52
commit 0d1be722a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -6,7 +6,7 @@
import_tasks: prompts.yml
- name: Create an ssh key
hcloud_ssh_key:
hetzner.hcloud.ssh_key:
name: algo-{{ 999999 | random(seed=lookup('file', SSH_keys.public)) }}
public_key: "{{ lookup('file', SSH_keys.public) }}"
state: present
@ -14,7 +14,7 @@
register: hcloud_ssh_key
- name: Create a server...
hcloud_server:
hetzner.hcloud.server:
name: "{{ algo_server_name }}"
location: "{{ algo_hcloud_region }}"
server_type: "{{ cloud_providers.hetzner.server_type }}"

@ -13,13 +13,13 @@
algo_hcloud_token: "{{ hcloud_token | default(_hcloud_token.user_input|default(None)) | default(lookup('env','HCLOUD_TOKEN'), true) }}"
- name: Get regions
hcloud_datacenter_facts:
hetzner.hcloud.datacenter_info:
api_token: "{{ algo_hcloud_token }}"
register: _hcloud_regions
- name: Set facts about the regions
set_fact:
hcloud_regions: "{{ hcloud_datacenter_facts | sort(attribute='location') }}"
hcloud_regions: "{{ _hcloud_regions.hcloud_datacenter_info | sort(attribute='location') }}"
- name: Set default region
set_fact:

Loading…
Cancel
Save