Skip to content

Commit

Permalink
fix: Execute function when required variable is defined (#234)
Browse files Browse the repository at this point in the history
Execute function when required variable is defined.

Signed-off-by: Klaus Smolin <smolin@de.ibm.com>
  • Loading branch information
smolin-de committed Jan 10, 2024
1 parent 04aa9eb commit f9fda85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions playbooks/create_compute_node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
param_dns_ip: "{{ day2_compute_node.vm_ip }}"

- role: create_compute_node
when: param_compute_node.hostname is defined
# Some tasks will be delegated to the bastion host and target KVM host
param_compute_node: "{{ day2_compute_node }}"

Expand Down
1 change: 1 addition & 0 deletions roles/delete_compute_node/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

- name: Delete compute node VM on KVM host and print command output
tags: delete_compute_node
when: param_compute_node.hostname is defined
delegate_to: "{{ param_compute_node.hostname }}"
block:
- name: Delete compute node VM on KVM host
Expand Down

0 comments on commit f9fda85

Please sign in to comment.