-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c26da2b
commit 76443a3
Showing
9 changed files
with
338 additions
and
353 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
--- | ||
# Here we will discover nodes and also get node network info of particular some discovered nodes | ||
- name: Discover nodes and get their network info | ||
hosts: localhost | ||
gather_facts: false | ||
collections: | ||
- nutanix.ncp | ||
tasks: | ||
- name: Discover all nodes | ||
ntnx_foundation_discover_nodes_info: | ||
nutanix_host: "10.xx.xx.xx" | ||
# resume line 12 to include configured(nodes part of cluster) nodes in the output | ||
# include_configured: true | ||
nutanix.ncp.ntnx_foundation_discover_nodes_info: | ||
nutanix_host: 10.xx.xx.xx | ||
# unskip line 12 to include configured(nodes part of cluster) nodes in the output | ||
# include_configured: true | ||
register: discovered_nodes | ||
|
||
# get network info of nodes discovered from ntnx_foundation_discover_nodes_info module | ||
- name: Get node network info of some discovered nodes | ||
ntnx_foundation_node_network_info: | ||
nutanix_host: "10.xx.xx.xx" | ||
nutanix.ncp.ntnx_foundation_node_network_info: | ||
nutanix_host: 10.xx.xx.xx | ||
nodes: | ||
- "{{discovered_nodes.blocks.0.nodes.0.ipv6_address}}" | ||
- "{{discovered_nodes.blocks.1.nodes.0.ipv6_address}}" | ||
register: result | ||
|
||
- debug: | ||
- name: Print node network info | ||
ansible.builtin.debug: | ||
msg: "{{ result }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.