Thanks! That's interesting because the documentation consistently refers to 
the first string following the type of a resource as the "title". Hence, my 
confusion. I'll email the puppet folks and ask them just to put a note in 
the docs to clarify this.

On Wednesday, May 29, 2013 5:09:50 PM UTC+8, Erik Dalén wrote:
>
> A resource declaration doesn't create a new variable scope,  so the $title 
> variable has the value of the scope containing the resource,  in this case 
> stage main. 
> On 29 May 2013 08:28, <[email protected] <javascript:>> wrote:
>
>> I have a file with this code in it:
>>
>> notify {'a':
>>   message => "${title}"
>> }
>>
>> The output after running 'puppet apply file.pp':
>>
>> notice: main
>> notice: /Stage[main]//Notify[a]/message: defined 'message' as 'main'
>> notice: Finished catalog run in 0.57 seconds
>>
>> I expected this output:
>>
>> notice: a
>> notice: /Stage[main]//Notify[a]/message: defined 'message' as 'a'
>> notice: Finished catalog run in 0.57 seconds
>>
>> Why is $title considered to have the value "main"?
>>
>> -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to