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.
the reason why I say that it doesn't scale is that for example if the
ntp file changes you'd like to to restart the ntp service if the ntp
config changes and so on. Anyway the idea is to organize things that
belongs together, for example for ntp, the package, the service and
the config file in one module, which encapsulates the resource ntp
you'd like to manage.
Further if you remove something in the source folder it won't be
removed on the server, you have to do that anyway manually.
Anyway the following receipe should do what you want:
node default { include solaris }
class solaris {
file { "/etc":
source => "puppet:///files-solaris/etc/",
ensure => directory,
recurse => true,
}
}
however again, I really don't like the idea of managing /etc in one
big piece. But to start and try things out you could do that.
If you still encounter the error, please post the output with --trace
and let us know about server and client versions.
cheers pete
--
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.