magicaltrout
2011-Nov-17 21:36 UTC
[Puppet Users] Using File when its source doesn''t exist
Hi guys, I''m trying to use the Apache SSL class from the camptocamp apache module, The problem seems to be in the File type at the bottom https://github.com/camptocamp/puppet-apache/blob/master/manifests/vhost-ssl.pp Whilst source => "file://$csrfile" doesn''t exist at the time of running, an exec creates it before the file is supposed to be run as the require states. So i assume this used to work as puppet wont have checked to see if the source exists. But now it does, I''ve tried putting the file in a new definition but it does the same thing and tells me the file isn''t available, is there a sensible work around? Thanks Tom -- 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.
Stefan Schulte
2011-Nov-18 20:13 UTC
Re: [Puppet Users] Using File when its source doesn''t exist
On Thu, Nov 17, 2011 at 01:36:07PM -0800, magicaltrout wrote:> Hi guys, > > I''m trying to use the Apache SSL class from the camptocamp apache > module, The problem seems to be in the File type at the bottom > https://github.com/camptocamp/puppet-apache/blob/master/manifests/vhost-ssl.pp > > Whilst source => "file://$csrfile" doesn''t exist at the time of > running, an exec creates it before the file is supposed to be run as > the require states. > > So i assume this used to work as puppet wont have checked to see if > the source exists. But now it does, I''ve tried putting the file in a > new definition but it does the same thing and tells me the file isn''t > available, is there a sensible work around? > > Thanks > > TomAre you sure the file gets created? Does puppet fail on the first run and runs fine on the second run (when the file was present from the beginning) I was not able to reproduce the issue with the following test: puppet apply -v << EOF exec { ''create_source'': command => ''/bin/echo "Hallo" > /tmp/source'', creates => ''/tmp/source'', } file { ''/tmp/dest'': ensure => file, source => ''/tmp/source'', require => Exec[''create_source''], } EOF Does it change anything if you substitude "file://$csrfile" with just $csrfile? If it still fails, can you please run puppet (agent) with --debug and --verbose commandline arguments. -Stefan
Apparently Analagous Threads
- Using modules from PuppetForge
- File-based Distribution, Module Function Logic and Per Setting (Augeas); Which method do you think is best for the env i help to support and why?
- [python indexer] add meta informations
- [0.25.5] Default provider
- getting a list of rules out of iptables