Fixup volume creation functionality
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/tag Build is failing

This commit is contained in:
Luke Murphy
2021-01-06 15:21:42 +01:00
parent 5fd3f5ca94
commit 1423840fba
6 changed files with 34 additions and 31 deletions

View File

@ -41,12 +41,9 @@
name: "{{ item.volumes.name | default(item.instance) }}"
server: "{{ item.instance }}"
api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}"
state: "absent"
state: absent
register: volumes
with_items: "{{ instance_conf }}"
when:
- item.volumes is defined
- item.volumes.create | default(False) | bool
async: 7200
poll: 0
@ -66,7 +63,7 @@
state: absent
when:
- not skip_instances
- instance_conf | length # must contain at least one instance
- instance_conf | length # must contain at least one instance
- name: Populate instance config
set_fact: