title: Getting the private ip of the machine in Puppet
body: <p>I am just thinking is there a way of getting the private Ip of the machine and using that in our puppet script, so let suppose we have the script to show the IP as:</p>
  
  <pre><code>class test{
  
      $my_ip=&lt;some code&gt;
  
      file{'print_ip_to_my_file':
         path =&gt; "/tmp/ip.txt",
         content =&gt; "This is test file and the private ip is : ${my_ip}"
      }
  }
  </code></pre>
  
  <p>How can I get the <strong>private Ip</strong> in the file?</p>