On Mon, Jul 18, 2011 at 6:08 PM, Dan Hanks <danhanks@gmail.com>
wrote:> Hi there,
> I''m using an older puppet (0.25) and vcsrepo. I''m trying
to do something
> like this (client-side only, no master involved):
> vcsrepo {
> "/svn/checkout/":
> source => svn://host/path,
> revision => $revision,
> ensure => present,
> provider => "svn"
> }
> file {
> "my_file":
> path => "/path/to/file",
> ensure => "present",
> content => template("/svn/checkout/my/file.erb")
> require => Vcsrepo["/svn/checkout"]
> }
> However, if I run the above I get "Can not use a non-existent file for
> parsing". I assume puppet is trying to parse the file.erb before
running any
> the file or vcsrepo resources. But the file.erb isn''t there yet
since the
> vcsrepo checkout hasn''t happened. Is this by design? Are templates
parsed as
> part of the manifest parse?
template() is a function and functions are processed during
compilation of the manifest and not during the enforcement of the
catalog. In this case since it needs the file
/svn/checkout/my/file.erb before it can enforce the svn resource in
the catalog you need to stage this into two separate runs.
Thanks,
Nan
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.