Issue #3224 has been updated by Brice Figureau.

Bruno Leon wrote:
> Sorry I was not calling my dev environement, this is reproductible as shown 
> below:
> 
> [...]
> 
> bad result:  notice: 
> //Node[ernest]/Ssh::Keyaddtouser[nono_in_nono]/Ssh_authorized_key[nono_]/ensure:
>  created
> good result: notice: 
> //Node[ernest]/Ssh::Keyaddtouser[nono_in_nono]/Ssh_authorized_key[nono_nono]/ensure:
>  created
> 
> And of course the key is added correctly in the later case

To me, this has nothing to do with require. 
It's just the same scope issue as usual that will be fixed with Markus Futures 
patch.

@${user::nono::username_nono}@ is evaluated before the @include user::nono@, so 
the variable doesn't yet contain a value and the ssh_authorized_key is applied 
to "nono_" instead of "nono_nono".

In other words, the current 0.25 parser doesn't follow "require" parameters 
(this is used to order application of resources). So the parse order for 
variables is important.

----------------------------------------
Bug #3224: Require statement not followed (parse order issue ?)
http://projects.reductivelabs.com/issues/3224

Author: Bruno Leon
Status: Accepted
Priority: Normal
Assigned to: Brice Figureau
Category: parser
Target version: 
Affected version: 0.25.4
Keywords: 
Branch: 


I have a define which require on a class
@require        => Class["user::${user}"]@

However, this statement does not seem to be followed, as the two below set of 
code do not result in the same result. In the latter case my ssh key is empty:

<pre>
include user::nono
ssh::keyaddtouser { "nono_in_nono": user => 'nono', dest_user => 'nono', key => 
$user::nono::sshkey ,date => $user::nono::sshkeydate }
ssh::keyaddtouser { "nono_in_root": user => 'nono', dest_user => 'root', key => 
$user::nono::sshkey ,date => $user::nono::sshkeydate }
</pre>

<pre>
ssh::keyaddtouser { "nono_in_nono": user => 'nono', dest_user => 'nono', key => 
$user::nono::sshkey ,date => $user::nono::sshkeydate }
ssh::keyaddtouser { "nono_in_root": user => 'nono', dest_user => 'root', key => 
$user::nono::sshkey ,date => $user::nono::sshkeydate }
include user::nono
</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://reductivelabs.com/redmine/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to