Require on stored resources

22 views
Skip to first unread message

Ray

unread,
Nov 12, 2012, 3:22:31 AM11/12/12
to puppet...@googlegroups.com
Hi,

is there a way to do something alongs the lines of

Exec { "assembleBINDZoneFile":
   ...
   require => [File["${bindzoneassemblyscript}"], Dnsrecord[ <<| |>> ] ],
}

I've written a DNS record Type/Provider. Exporting Dnsrecord resources with @@ also works nicely.

Before the zonefine gets assembled, I want to make sure that puppet first collects all the Dnsrecord resources from its DB. The first way that come to my mind was to put  Dnsrecord[ <<| |>> ] into the "require => " line, however, this does not seem to be the right way: "Error 400 on SERVER: Syntax error at '<<|'; expected '|>>'" is all I get.

Any thoughts?

Cheers,
Ray

jcbollinger

unread,
Nov 12, 2012, 9:06:29 AM11/12/12
to puppet...@googlegroups.com


You should be able to do this via the chain operator:

exec { 'assembleBINDZoneFile':

   ...
   require => File["${bindzoneassemblyscript}"]
}

Dnsrecord<<| |>> -> Exec['assembleBINDZoneFile']


John

Reply all
Reply to author
Forward
0 new messages