I thinks you are in the case explained here 
http://reductivelabs.com/trac/puppet/wiki/CommonMisconceptions

Silviu

Mark Christian wrote:
> say I have a couple nodes:
>
> node 'uk-host' inherits basenode {
>     $site = "UK"
> }
> node 'ap-host' inherits basenode {
>     $site = "AP"
> }
>
> Is it possible to pass the $site variable to the file resource source
> parameter?:
>
> class ntp {
>
>     package { ntp: ensure => installed }
>
>     file { "/etc/ntp.conf":
>         owner   => root,
>         group   => root,
>         mode    => 0644,
>         source  => "puppet:///ntp/$site/ntp.conf",  # $modulepath/ntp/
> files/{AP,UK}/ntp.conf
>         source  => "puppet:///ntp/ntp.conf",
>         notify  => Service[ntpd],
>         require => Package["ntp"],
>     }
>
>     service { ntpd:
>         name    => "ntpd",
>         enable  => true,
>         hasstatus => true,
>         hasrestart => true,
>         ensure  => running,
>         require => Package["ntp"],
>     }
> }
>
> The above does not appear to work.  Am I simply misguided and should I
> be trying something else?  Thank you.
>
> Mark
>
> >
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
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