Issue #1691 has been updated by masterzen.

Status changed from Accepted to Duplicate
Complexity changed from Unknown to Trivial

rgsteele wrote:
> Manifest that fails
> 
>    $foo = ["bar", "baz"]
>    realize( Group[$foo] )
> 
> Failure output
> 
>    err: Could not retrieve catalog: Failed to realize virtual resources 
> Group[bar], Group[baz] on node pinocchio
> 
> Manifest that works
> 
>    realize( Group["bar", "baz"] )

This is a duplicate of #1682, that I'm going to fix soon.

I transposed the snippets to file resources as it is easier to test, and:
<pre>
@file {
        "/tmp/a": content => "a";
        "/tmp/b": content => "b";
}

$foo="blah"
if $foo == "blah" {
  realize( File["/tmp/a"] )
  realize( File["/tmp/b"] )
}
</pre>
is working fine.

The two following snippets are failing:
<pre>
@file {
        "/tmp/a": content => "a";
        "/tmp/b": content => "b";
}

  realize( File["/tmp/a","/tmp/b"] )
</pre>

and
<pre>
@file {
        "/tmp/a": content => "a";
        "/tmp/b": content => "b";
}

$foo = ["/tmp/a","/tmp/b"]
realize( File[$foo] )
</pre>

This is because, AST::ASTArray doesn't flatten it's child after re-evaluating 
them.
----------------------------------------
Bug #1691: Realization fails if variable is used to represent array OR multiple 
realizes exist in a single 'if' statement
http://projects.reductivelabs.com/issues/show/1691

Author: rgsteele
Status: Duplicate
Priority: Normal
Assigned to: masterzen
Category: language
Target version: 0.24.7
Complexity: Trivial
Affected version: 0.24.6
Keywords: 


Manifest that fails

   $foo = ["bar", "baz"]
   realize( Group[$foo] )

Failure output

   err: Could not retrieve catalog: Failed to realize virtual resources 
Group[bar], Group[baz] on node pinocchio

Manifest that works

   realize( Group["bar", "baz"] )




----------------------------------------
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