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 <ug...@lubik.ca<javascript:>> 
> 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?

That is really nice.

Too bad I don't have much time to play with puppet.  I know, puppet would 
save me time :). 

Thanks a lot!

-- 
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/-/o8Ha-SOdiF4J.
To post to this group, send email to puppet-users@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