|
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.
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...@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.
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.
--
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+unsubscribe@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.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/c483df41-feb1-4e79-b8f8-830da148f763%40googlegroups.com.