diff --git a/defaults/main.yml b/defaults/main.yml index 463a1f3..84a7087 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -11,6 +11,8 @@ hcloud_server: {} # api_token: "{{ hcloud_server_api_token | default(omit) }}" # @end +# @var hcloud_server_default_api_token: $ "_unset_" + hcloud_server_volumes: [] # @var hcloud_server_volumes:example: > # hcloud_server_volumes: diff --git a/tasks/setup.yml b/tasks/setup.yml index 73fc9c4..db27eaa 100644 --- a/tasks/setup.yml +++ b/tasks/setup.yml @@ -6,7 +6,7 @@ ssh_keys: "{{ hcloud_server.ssh_keys | default([]) }}" image: "{{ hcloud_server.image | default('centos-7') }}" location: "{{ hcloud_server.location | default('nbg1') }}" - api_token: "{{ hcloud_server.api_token | default(omit) }}" + api_token: "{{ hcloud_server.api_token | default(hcloud_server_default_api_token | default(omit)) }}" state: present register: __hcloud_server async: 7200