Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

Access variable from other manifest

$
0
0
Hi, I'm trying to write my own module ...Right now it is only a experimental and consists from 2 manifests... ###init.pp### class ntp ( $var = $ntp::params::ip1, ) { file { '/tmp/module.conf': path => '/tmp/module.conf', ensure => file, content => "$var", } } ###params.pp### class ntp::params { $ip1 = "8.8.8.8", } I just want to print the value stored in manifest params.pp in variable ip1 to the file /tmp/module.conf, but I always get no result in the file.. if I change variable $var to some string it appears in the file...Could you help me, what am I doing wrong?

Viewing all articles
Browse latest Browse all 6104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>