Of course the file you want to deploy with puppet must be readable by the puppetmaster. Do you use Apache Passenger, Nginx or webbrick?
If you use Apache Passenger: The file /etc/puppet/files/server_file must be readable by the user, who owns the /etc/puppet/rack/config.ru file. On Tuesday, July 10, 2012 4:11:02 PM UTC+2, Marshie8 wrote: > > > On Tuesday, July 10, 2012 11:33:38 AM UTC+1, Matthew Burgess wrote: >> >> My suggestion would be to take a copy of the file as it is on your >> server now, and place it under the control of puppet. The following >> simple manifest should do what you're after: >> >> class server_file { >> >> file { "/destination/path/to/your/file": >> owner => owner, >> group => group, >> mode => 0640, >> source => "puppet:///files/server_file", >> } >> } >> >> > Hi Matt, > > Thanks for your response. > > I tried your example but the client is complaining of a permissions error: > > Jul 10 15:00:24 system1 puppet-agent[16595]: > (/Stage[main]/Server_file/File[/etc/server_file]) Could not evaluate: Error > 400 on SERVER: Permission denied - /etc/puppet/files/server_file Could not > retrieve file metadata for puppet:// > server-1.company.com/etc/puppet/files/server_file: Error 400 on SERVER: > Permission denied - /etc/puppet/files/server_file at > /etc/puppet/manifests/classes/server_file.pp:11 > > Is there a way I can overcome this, perhaps by changing the ownership > temporarily? > > The original file will be changed semi-regularly by users on the server - > they have no problem with that - so I put in a cron job to copy it into the > puppet directory every 10 minutes. > > I know it's messy but I don't care if it works - each client system needs > to take a copy of that file and apply the same permissions to it. > > Cheers, > > M > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/CQZBl0CU1toJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.