relationships, ordering, and defined types

8 views
Skip to first unread message

Matt Zagrabelny

unread,
Jan 22, 2019, 5:20:37 PM1/22/19
to puppet...@googlegroups.com
Greetings!

I'm running puppet 5.5 on Debian Buster.

This exists:

define bar::baz() {
    file { "/tmp/$name": }
}

...somewhere else...

bar::baz { 'qux': }

file { '/tmp/foo':
    before => Bar::baz['qux'],
}

But when the catalog gets compiled I get an error:

Evaluation Error: Error while evaluating a Resource Statement, Illegal class reference

Is it possible to use a defined type with a "before" (or any other relationship metaparameter) ?

Thanks!

-m

Ben Ford

unread,
Jan 22, 2019, 5:22:38 PM1/22/19
to puppet...@googlegroups.com
Caps all segments in a defined type name:

before => Bar::Baz['qux'],

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAOLfK3V7E47VzhjNSznYTC_UuH%3DK44GsgLuH9y4vnTFy70i5QA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Matt Zagrabelny

unread,
Jan 22, 2019, 5:26:41 PM1/22/19
to puppet...@googlegroups.com
On Tue, Jan 22, 2019 at 4:22 PM Ben Ford <ben....@puppet.com> wrote:
Caps all segments in a defined type name:

before => Bar::Baz['qux'],


Huzzah!
 
Thanks Ben!

-m
Reply all
Reply to author
Forward
0 new messages