-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Anchi Zhang 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."

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. Remember
that with puppet your not keeping a bunch of files in sync, you rather
keep the servers in a defined state.

cheers pete
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAktfSp4ACgkQbwltcAfKi3+nFACgim27NhkrXf6GSoa0V+OVzuL8
uzIAn3NMyl6scxbBe8LWQqVfnBmNl6eN
=pY4P
-----END PGP SIGNATURE-----

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