fix api token vars
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2020-05-19 22:57:51 +02:00
parent ed0baf8dea
commit 75b59cbc1a
2 changed files with 8 additions and 6 deletions

View File

@ -6,11 +6,13 @@ hcloud_server: {}
# type: cx11
# ssh_keys: []
# image:
# location: "{{ hcloud_server_location }}"
# datacenter: "{{ hcloud_server_datacenter }}"
# api_token: "{{ hcloud_server_api_token | default(omit) }}"
# location: "{{ hcloud_server_location }}"
# datacenter: "{{ hcloud_server_datacenter }}"
# api_token: "{{ hcloud_server_api_token | default(omit) }}"
# @end
hcloud_server_default_image: centos-7
# @var hcloud_server_default_api_token: $ "_unset_"
hcloud_server_volumes: []

View File

@ -4,7 +4,7 @@
name: "{{ hcloud_server.name }}"
server_type: "{{ hcloud_server.type | default('cx11') }}"
ssh_keys: "{{ hcloud_server.ssh_keys | default([]) }}"
image: "{{ hcloud_server.image | default('centos-7') }}"
image: "{{ hcloud_server.image | default(hcloud_server_default_image) }}"
location: "{{ hcloud_server.location | default('nbg1') }}"
backups: "{{ hcloud_server.backups | default('no') }}"
labels: "{{ hcloud_server.labels | default({}) }}"
@ -38,7 +38,7 @@
name: "{{ item.name }}"
server: "{{ hcloud_server.name }}"
size: "{{ item.size | default(10) }}"
api_token: "{{ item.api_token | default(hcloud_server_default_api_token | default(omit)) }}"
api_token: "{{ hcloud_server.api_token | default(hcloud_server_default_api_token | default(omit)) }}"
state: "{{ item.state | default('present') }}"
loop: "{{ hcloud_server_volumes }}"
loop_control:
@ -50,7 +50,7 @@
server: "{{ hcloud_server.name }}"
ip_address: "{{ item.addr }}"
dns_ptr: "{{ item.ptr }}"
api_token: "{{ item.api_token | default(hcloud_server_default_api_token | default(omit)) }}"
api_token: "{{ hcloud_server.api_token | default(hcloud_server_default_api_token | default(omit)) }}"
state: "{{ item.state | default('present') }}"
loop: "{{ hcloud_server_rdns }}"
loop_control: