You need to set an dependency for ntp::params and ntp::install to be processed 
in strict order.
e.g.
Class[‘::ntp::params’] -> Class[‘::ntp::install’]

hth,

Martin

On 11 Dec 2014, at 04:24, 巨海录 <[email protected]> wrote:

> # ntp/manifests/init.pp
> class ntp (
>   $var_01 = '/etc/ntp.conf',
>   $var_02 = 'ntp/ntp.conf.erb',
> ) {
>   include ::ntp::params
>   include ::ntp:install
> }
> 
> # ntp/manifests/params.pp
> class ntp::params {
>   $var_03 = 'no.3'
>   $var_o4 = 'no.4'
> }
> 
> # ntp/manifests/install.pp
> class ntp::install {
>   notify {"var_01 == ${ntp::var01}": }
>   notify {"var_01 == ${ntp::var02}": }
>   notify {"var_03 == ${ntp::params::var_03}": }
>   notify {"var_04 == ${ntp::params::var_04}": }
> }
> 
> # site.pp
> include ntp
> 
> and i run this cmmand:
> 
> puppet apply site.pp
> 
> how puppet program parser these code in order?
> 
> because sometime i can't get the correct value of var_03 and var_04.  and 
> they would all be nil.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/1178e436-af54-4381-bfc9-ad96ea1cedb4%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/8B995118-1C29-4A95-AE48-C7DD516A9256%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to