Skip to content

Commit

Permalink
Merge pull request #49 from rebtoor/main
Browse files Browse the repository at this point in the history
Use `$node.hostName` if `$node.ansible.ansibleHost` isn't available
  • Loading branch information
openshift-merge-bot[bot] authored May 7, 2024
2 parents e4170af + c8c14ea commit 08b35ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion collection-scripts/gather_edpm_sos
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ gather_edpm_sos () {
}


data=$(oc get openstackdataplanenodesets --all-namespaces -o go-template='{{range $indexns,$nodeset := .items}}{{range $index,$node := $nodeset.spec.nodes}}{{printf "%s %s %s %s %s\n" $node.hostName $node.ansible.ansibleHost $nodeset.spec.nodeTemplate.ansible.ansibleUser $nodeset.spec.nodeTemplate.ansibleSSHPrivateKeySecret $nodeset.metadata.namespace}}{{end}}{{end}}')
data=$(oc get openstackdataplanenodesets --all-namespaces -o go-template='{{range $indexns,$nodeset := .items}}{{range $index,$node := $nodeset.spec.nodes}}{{printf "%s " $node.hostName}}{{if $node.ansible.ansibleHost}}{{printf "%s " $node.ansible.ansibleHost}}{{else}}{{printf "%s " $node.hostName}}{{end}}{{printf "%s %s %s\n" $nodeset.spec.nodeTemplate.ansible.ansibleUser $nodeset.spec.nodeTemplate.ansibleSSHPrivateKeySecret $nodeset.metadata.namespace}}{{end}}{{end}}')

while read -r node address username secret namespace; do
[[ -z "$node" ]] && continue
Expand Down

0 comments on commit 08b35ee

Please sign in to comment.