Issue #21948 has been reported by Jeremy Kitchen.
----------------------------------------
Bug #21948: resource collection == doesn't compare arrays vs arrays
https://projects.puppetlabs.com/issues/21948
* Author: Jeremy Kitchen
* Status: Unreviewed
* Priority: Normal
* Assignee:
* Category:
* Target version:
* Affected Puppet version:
* Keywords:
* Branch:
----------------------------------------
given:
@user { 'foo':
groups => ['a','b'],
}
@user { 'bar':
groups => ['b','c'],
}
This is what DOES happen:
User<| groups == ['a', 'b'] |> # realizes only user foo
User<| groups == 'b' |> # realizes both, as to be expected
So, it would appear that an array on the left hand side is acceptable, but not
on the right.
This is what I would expect:
User<| groups == ['a','b'] |> # realizes both
User<| groups == ['a', 'c'] |> # realizes both
I mainly want this so I can do:
User<| groups == hiera_array('include_groups') |>
I'm using puppet 3.2.3 on both master and agent.
I'm not against doing something like:
$include_groups = hiera_array('include_groups')
$include_groups.each { | $group |
User<| groups == $group |>
}
The only problem I have with that is it's experimental and may go away, so I
don't want to rely upon that functionality if it may not be there next version.
The documentation says it will pull in all resources matching the search key
(the right hand operand), which I admittedly initially misread, but the fact
that *anything* gets returned makes me wonder if there's more behind this issue.
--
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://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" 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-bugs.
For more options, visit https://groups.google.com/groups/opt_out.