Ask Your Question

"Failed to generate additional resources using eval_generate: No such file or directory"

asked 2015-01-29 18:20:05 -0500

schen gravatar image

I am trying to run a Puppet module for updating an application with a complex directory tree. The directory tree's top level contains a number of scripts copied from the Puppet repository as well as subdirectories that are initially empty and are only populated when the application runs. The application also creates temporary files in the top-level directory. In my Puppet module, I sync the top-level directory using recurse->true and then make sure the subdirectories exist. When I apply this module, the Puppet run frequently ends unsuccessfully with this error:

Failed to generate additional resources using 'eval_generate: No such file or directory

followed by the name of one of the temporary files that was not in the Puppet repository. How do I get rid of this?

My Puppet manifest looks like:

 file { topleveldir:
    ensure  => directory,
    source  => 'puppet:///modules/mymodule/topleveldir',
    recurse => true,
    purge  => false,
 file { $directories:
    ensure   => directory,

where $directories is an array of the subdirectory names. I have also tried adding the ignore attribute to the topleveldir resource, but the error still occurs.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-02-09 01:01:59 -0500

joshc gravatar image

The topleveldir recursive file resource will dynamically generate file resources for each subdirectory and file contained in topleveldir. It's not necessary (and actually an error) to explicitly declare the subdirectories as you've done in file { $directories: ... }. Puppet can't prevent you from doing that, because recursive file resources are dynamically generated when the agent is processing the topleveldir resource.

I would remove the file { $directories: ... } resource, and puppet should copy the directory tree from the module to the agent.

edit flag offensive delete link more


The Puppet repo on our server is pulled from Git, which does not track empty directories. Other than directly modifying the server, is the only proper way to get these subdirectories created to just put empty files in them?

schen gravatar imageschen ( 2015-02-09 12:14:46 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-01-29 18:20:05 -0500

Seen: 1,037 times

Last updated: Feb 09 '15