On Jul 23, 2010, at 3:04 PM, John T. Guthrie wrote:

> What would be the LDAP equivalent of the following AST configuration:
> 
> node "test" {
>    definetest::optfile {
>        "file1":
>            fname => "foo";
>        "file2":
>            fname => "bar";
>    }
> }

So you want to list individual files to be copied around in LDAP somehow? If 
so, I think you probably want to store the list of files using the `puppetVar` 
attribute. I haven’t used it, but I imagine that’s the place for 
machine-specific data.

Really though, it sounds like you need to generalize things. In most cases, 
Puppet should know what to do based on the class(es) a system belongs to and 
not it’s hostname.

There are always exceptions of course. There are cases where I want Puppet to 
distribute a file to the same path with different contents. What I usually do 
there is use the hostname in the filename on the Puppetmaster (which has no 
bearing on the client). For example:

    file { "replicationconf":
      name => "/etc/openldap/replication.conf",
      ensure => file,
      owner => "root",
      group => "ldap",
      mode => "640",
      source => "puppet://puppet/files/$environment/ldap/$hostname.replication",
      notify => Service["ldap”],
    }

Although, now that I think about it, the per-host changes in that example are 
so minimal, I should probably look into using `puppetVar` and a template for 
this file.

-- 
Rob McBroom
<http://www.skurfer.com/>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to