<http://stackoverflow.com/questions/28150477/file-traverse-and-read-failure-in-vagrant-puppet-setup#>
 
  
I have a Vagrant / Puppet set up in which I am attempting to generate a 
bunch of configuration files and then concatenate them into a master file.

The individual files are generated and written to a conf directory and the 
last action is to create the master file which uses an erb template to read 
the files in the conf directory.

<% files = Dir["/etc/sysconfig/iptables/conf/*.conf"] -%>
<% files.each do |name| -%>
<% file = File.open(name) -%>
<% contents = file.read -%>
<%= contents %>
<% end -%>

When I run "vagrant up", everything appears to run correctly but the master 
configuration file is empty. I have checked the timestamps on the conf 
directory and the master configuration file and they are correct (the 
master config file is created after all the individual config files).

If I ssh into vagrant and run "puppet apply" manually, the master config 
file is created as expected. I have tried using a bash script instead of 
the erb method but encountered the same problems.

Does anyone have any ideas what might cause this?

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/ee7bea64-eb74-42be-b724-2e95d08ae4c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to