Skip to content

Commit

Permalink
improve query for transport nodes (#20)
Browse files Browse the repository at this point in the history
* improve query for transport nodes
to only query for host nodes and not edge nodes

* fix yamllint issues
  • Loading branch information
Knappek authored Sep 30, 2024
1 parent 7f3110c commit 060a317
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion roles/nsxt/nsxt-transport-nodes/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@
register: host_transport_node_facts
retries: 120
delay: 10
until: host_transport_node_facts.results and host_transport_node_facts.results[0].node_deployment_info.managed_by_server
until:
- host_transport_node_facts.results
- host_transport_node_facts | community.general.json_query(host_node_query)
vars:
host_node_query: "results[?node_deployment_info.resource_type=='HostNode'].node_deployment_info.managed_by_server"

- ansible.builtin.debug: msg="Creating edge nodes {{ nsxt.edge_nodes }}"

Expand Down

0 comments on commit 060a317

Please sign in to comment.