Skip to content

Commit 58ab5b6

Browse files
authored
fix(ansible): use inventory_hostname for s390x destruction (#2190)
1 parent f555c23 commit 58ab5b6

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

ansible/roles/destroy-vm/tasks/destroy-s390x-vm.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
1-
- name: Get host name
2-
shell: hostname
3-
register: hostname
4-
5-
- debug:
6-
var: hostname
7-
81
- name: Check for existing VSI
92
delegate_to: localhost
103
ibm.cloudcollection.ibm_is_instance_info:
11-
name: "{{ hostname.stdout }}"
4+
name: "{{ inventory_hostname }}"
125
failed_when:
136
- vsi.rc != 0
147
- '"No Instance found" not in vsi.stderr'
@@ -31,7 +24,7 @@
3124
- name: Check for existing floating IP
3225
delegate_to: localhost
3326
ibm.cloudcollection.ibm_is_floating_ip_info:
34-
name: "{{ hostname.stdout }}-fip"
27+
name: "{{ inventory_hostname }}-fip"
3528
failed_when:
3629
- fip.rc != 0
3730
- '"No floatingIP found" not in fip.stderr'

0 commit comments

Comments
 (0)