This sounds like an ordering problem. What happens if you do "vagrant destroy -f && vagrant up && vagrant provision"?
If that works it may mean that you need to run puppet apply multiple times and that can point to an order issue. Regards On Monday, January 26, 2015, Luke O'Sullivan <[email protected]> wrote: > > <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 [email protected] > <javascript:_e(%7B%7D,'cvml','puppet-users%[email protected]');> > . > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/ee7bea64-eb74-42be-b724-2e95d08ae4c6%40googlegroups.com > <https://groups.google.com/d/msgid/puppet-users/ee7bea64-eb74-42be-b724-2e95d08ae4c6%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Those who do not understand Unix are condemned to reinvent it, poorly. Any sufficiently recent Microsoft OS contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Unix. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAApMPgwevPNzfYav7tC4L3mrALhCEf4fH%2B%3DsuvXQAjgqvjfvmA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
