- From: Adam Jacob <
>
- To:
- Subject: [chef] Re: Re: Re: Re: Re: template source from databag
- Date: Tue, 6 Sep 2011 09:21:30 -0700
Just point the "source" parameter to the local template.
template "/tmp/config.conf" do
local true
source "/tmp/config.conf.erb"
end
That's taken from the second example for the template resource on the wiki:
http://wiki.opscode.com/display/chef/Resources#Resources-Template
Best,
Adam
--
Opscode, Inc.
Adam Jacob, Chief Product Officer
T: (206) 619-7151 E:
On Monday, September 5, 2011 at 10:49 PM, Stanislav Bogatyrev wrote:
>
In case of storing each policy template for each cluster in cookbook
>
we get bloated recipe with lot of duplicated information in it. And
>
also we need to update the recipe each time the new cluster is added.
>
I want to have something reusable.
>
So I figured out how to get policy template on local disk. How to
>
point template resource to use it?
>
Thank You!
>
>
2011/9/5 Adam Jacob
>
<
>
>
(mailto:
)>:
>
> Is this because you're going to be generating the templates
>
> themselves? Why not store the templates in the cookbook?
>
>
>
> Adam
>
>
>
> On Sun, Sep 4, 2011 at 4:09 AM, Stanislav Bogatyrev
>
> <
>
>
>
> (mailto:
)>
>
> wrote:
>
> > The actual template to be processed. I want to store pacamker policy
>
> > templates in databags.
>
> >
>
> > 2011/9/2 Brian Akins
>
> > <
>
> >
>
> > (mailto:
)>:
>
> > >
>
> > >
>
> > > On Fri, Sep 2, 2011 at 7:01 AM, Stanislav Bogatyrev
>
> > > <
>
> > >
>
> > > (mailto:
)>
>
> > > wrote:
>
> > > >
>
> > > > Is there any way to get template source not only from file in
>
> > > > cookbook, but from variable or databag item?
>
> > >
>
> > > You mean the actual template or the location of the template?
>
> >
>
> >
>
> >
>
> > --
>
> > WBR realloc()
>
>
>
>
>
>
>
> --
>
> Opscode, Inc.
>
> Adam Jacob, Chief Product Officer
>
> T: (206) 619-7151 E:
>
>
>
>
>
> (mailto:
)
>
>
>
>
--
>
WBR realloc()
Archive powered by MHonArc 2.6.16.