On Tue, Jan 26, 2010 at 2:15 PM, Anchi Zhang <anchi.zh...@gmail.com> wrote:

>
>
>  >>> My fileserver.conf contains
>> >>>
>> >>> [files-solaris]
>> >>> path /etc/puppet/manifests/files/solaris
>> >>> allow *
>> >>>
>> >>> and
>> >>>
>> >>> puppetmaster# ls /etc/puppet/manifests/files/solaris/etc
>> >>> motd           nsswitch.conf  pam.conf       resolv.conf
>> >>> I would like to have these files in /etc of all solaris hosts.
>> >> and so if you remove motd in /etc/puppet/manifests/files/solaris/etc
>> >> you'd like to have /etc/motd removed as well?
>> >>
>> > No, no removing.  Files are to be copied over if the source's version is
>> > different from that of the target.  This is the way I had files in sync
>> in
>> > cfengine.
>> >
>>
>> well, then I don't understand what you meant with:
>>
>> "But, if "/motd" is removed, files under /etc would not get updated."
>>
> I meant to say that, if a file name is specified such as /etc/motd, the
> config would work but, if /etc is specified with recurse => true to update
> all the files in files-solaris/etc, the config would not work.
>
>
>>
>> Something like that will work:
>>
>> node default { include solaris }
>> class solaris {
>>  etc_file{['motd','nsswitch.conf','pam.conf','resolv.conf']: }
>>
>>  define etc_file(){
>>    file { "/etc/${name}":
>>      source => "puppet:///files-solaris/etc/${name}",
>>    }
>>  }
>> }
>>
>> but this approach is not very puppet-like nor will it scale.
>
>
> This is what I try to avoid.  If a file/director gets added to
> files-solaris/etc such as inet/ntp.conf as a later time, no puppet config
> change would be necessary.
>

And my config was pretty much a direct copy from James Turnbull's book which
uses /etc/pam.d as an example.

-- 
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