title: How to get Jenkins node configurations from groovy
body: <p>I would like to use a groovy script in a job to read all the node configurations as viewed in the Node configuration in the Jenkins GUI. I know that it is possible to use the REST API to fetch node configurations, but I would like to know how to do this using the available library methods, e.g. from a system Groovy script.</p>
  
  <p>I envision something like this pseudo-code to print the Host as it is configured in the "Launch method" setting, if launch method is set to SSH:</p>
  
  <pre><code>jenkins.getNodes().each { node -&gt;
      println(node.getLaunchMethod().getHost())
  }
  </code></pre>
  
  <p>The answers to <a href="https://stackoverflow.com/questions/29242062/accessing-jenkins-global-property-in-groovy">Accessing Jenkins global property in Groovy</a> seems possibly to be relevant?</p>