On 2020-07-14 20:49, 'Frank Ihringer' via Puppet Users wrote:
> Hi Henrik (yeah, I took my time, but I was otherwise stressed)
>
> good idea and I have tested the 'reverse_each' allready, but it seems
> that everything is reversed (including the sub levels) and therefore the
> hiera data does not make sense anymore after reverting. It would only
> make sense if it could be limited to the top level of the hierarchy. I
> have solved it now in such a way that I have manually reversed the order
> of the aws objects (which is unfortunately error-prone, since every time
> a change must be made here too)
>
>
The reverse_each function only iterates over the top level (and in
reverse) so impossible that it inverts everything that is nested.
- henrik
> Best regards
>
> Frank
>
> Am Montag, 22. Juni 2020 15:41:56 UTC+2 schrieb Henrik Lindberg:
>
> On 2020-06-16 13:56, 'Frank Ihringer' via Puppet Users wrote:
> > hello
> > I/'/m just taking my first steps with puppet and aws (puppetlabs/aws
> > module). Setting up resources (controlled by hiera) works fine
> (using
> > .each loop). But if I want to delete the resources afterwards (with
> > absent) I get dependency errors (which is obvious, because the
> resources
> > are processed in the same order). I have to do it resource by
> resource
> > from the end of the list. Is there a simple way to reverse the
> > processing order (last hiera aws object first) ???
> >
> > I'm hoping someone here can give me an advice ...
>
> There is a `reverse_each()` function in puppet. Is that what you are
> looking for ?
>
> - henrik
> >
> > (btw: I'm working with puppet 6)
> >
> > Best regards
> >
> > Frank
> >
>
>
>
>
https://groups.google.com/d/msgid/puppet-users/875b6586-c8ba-46ca-a5c4-0390f37ac45eo%40googlegroups.com
> <
https://groups.google.com/d/msgid/puppet-users/875b6586-c8ba-46ca-a5c4-0390f37ac45eo%40googlegroups.com?utm_medium=email&utm_source=footer>.