Post details: Getting files from the fileserver without knowing its name

08/07/06

Permalink 03:47:26 pm, Categories: Puppet, 111 words  

Getting files from the fileserver without knowing its name

Puppet stores configuration files for all its clients on a central fileserver, which by default is the same as the puppetmaster. If a manifest needs to refer to a file on the fileserver without knowing the hostname of the puppetmaster explicitly, it can use the variable $servername in the manifest, which is set to the hostname of the puppetmaster. That means that writing

file { "/etc/somefile": 
  source => "puppet://$servername/config/somefile" 
}

will work regardless of the name of the puppetmaster. All it requires is that the fileserver runs on the same host as the puppetmaster, and that it has a module config. This is very helpful in writing portable manifests.

Permalink

Comments:

No Comments for this post yet...

Comments are closed for this post.

Search

Syndicate this blog XML

What is RSS?

Misc

powered by
b2evolution