On Sep 25, 2008, at 1:02 PM, Vlastimil Holer wrote:

>
> Hi,
>
> I'm trying to follow the Language tutorial (http://reductivelabs.com/
> trac/puppet/wiki/LanguageTutorial#classes) and the feature with '+>'
> operator. I would like to reach functionality shown in this example:
>
> -----
> file {
>        '/tmp/test1':
>                ensure  => file;
>        '/tmp/test2':
>                ensure  => file;
>        '/tmp/test3':
>                ensure  => file,
>                require => File['/tmp/test1'];
> }
>
> File['/tmp/test3'] { require +> File['/tmp/test2'] }
> -----
>
> I want to modify 'require' parametr ex post, but I get only error
> message:
> "Parameter 'require' is already set on File[/tmp/test3] at /tmp/ 
> puppet-
> test/test.pp:8; cannot redefine at /tmp/puppet-test/test.pp:11 on node
> xyz"
>
> If I don't define first 'require', it works.
>
> I have tried it with:
> puppet-0.24.5-1.fc9.noarch
> puppet-0.24.4-1.el5
> on Fedora 9 and CentOS 5.2.
>
> Can I do it somehow? Thank you for any help,

Appending and overriding attributes can only be done in subclasses,  
not in the same scope that the attribute is set.

I'm not actually convinced this makes a ton of sense in the current  
parser, now that I think of it, though...

-- 
Don't hit at all if it is honorably possible to avoid hitting; but
never hit soft! -- Theodore Roosevelt
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to