On Tuesday, November 20, 2012 2:25:13 PM UTC-5, Ugo Bellavance wrote: > > > > On Tuesday, November 20, 2012 11:30:47 AM UTC-5, Matthew Burgess wrote: >> >> On Tue, Nov 20, 2012 at 1:06 PM, Ugo Bellavance <[email protected]> wrote: >> >> > However, I would need to push a different file to my NTP servers (the >> > puppet://$puppet_server/files/ntp.conf) are for clients. How can I do >> that? >> > Can I simply declare my two servers in a node declaration and set a >> variable >> > in it and then use a puppet:// path that includes a variable? >> >> The simplest option here is to just do the following, taking your >> existing ntp.conf file stanza as an example: >> >> class ntpd { >> package { "ntp": >> ensure => installed, >> } >> file { "/etc/ntp.conf": >> owner => root, >> group => root, >> mode => 0644, >> source => ["puppet://$puppet_server/files/ntp.conf.$host, >> "puppet://$puppet_server/files/ntp.conf"], >> require => Package["ntp"] >> } >> >> Puppet will use the first file that it finds in the "source" array. >> For a more in depth explanation, see the 'source' parameter >> description at >> http://docs.puppetlabs.com/references/3.0.latest/type.html#file. >> > > Ok, so the process would be to first change my config to have the two > sources as you described, then have a file that has the "ntp server" confi, > called ntp.conf.ntp1.mydomain.com and symlink it to > ntp.conf.ntp2.mydomain.com? > > I tested it and at first it didn't work, so I changed $host for $fqdn. I tested it and it worked. I haven't tested the symlink yet but I'll do that tonight.
-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/mdpZRuLU7FcJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
