Re: [Puppet Users] Ruby script to download files without 'puppet agent'

2011-07-18 Thread vagn scott
On 07/18/2011 11:27 AM, zu...@puzzle.ch wrote: I saw that some use the shebang "#!/usr/bin/puppet apply" to start such manifests directly as a script. This does not seam to work for me. All i get is: If your script name is foo, and you have "#!/usr/bin/puppet apply" as the first line, then yo

Re: [Puppet Users] Ruby script to download files without 'puppet agent'

2011-07-18 Thread zuber
>> On Mon, Jun 27, 2011 at 7:27 AM, wrote: >> >>> We have often the Problem that some files need to be checked for >>> updates >>> faster than the cycle of the puppet agent. I try to solve this with a >>> script which tries to download the files directly from the fileserver >>> of >>> the puppetma

Re: [Puppet Users] Ruby script to download files without 'puppet agent'

2011-06-29 Thread Peter Meier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > [root@foo me]# ./puppet-wget file_content/sudo/sudoers > https://foo.bar:8140/file_content/sudo/sudoers > warning: peer certificate won't be verified in this SSL session > /usr/lib/ruby/1.8/net/http.rb:2099:in `error!': 403 "Forbidden request: > foo.

Re: [Puppet Users] Ruby script to download files without 'puppet agent'

2011-06-29 Thread Andreas Zuber
> > # make ssl request > > connection = Net::HTTP.new(url.host, url.port) > > connection.use_ssl = true > > connection.cert = OpenSSL::X509::Certificate.new(File.read(certpath)) > > connection.key = OpenSSL::PKey::RSA.new(File.read(pkey_path)) > > you are missing the CA file... something lik

Re: [Puppet Users] Ruby script to download files without 'puppet agent'

2011-06-27 Thread Ohad Levy
On Mon, Jun 27, 2011 at 5:55 PM, wrote: >> On Mon, Jun 27, 2011 at 7:27 AM, wrote: >> >>> I don't know if i got the URL right, i did not find any examples on the >>> REST API documentation for the fileserver. >>> >> >> This should cover it. >> >> http://docs.puppetlabs.com/guides/rest_api.html#f

Re: [Puppet Users] Ruby script to download files without 'puppet agent'

2011-06-27 Thread zuber
> On Mon, Jun 27, 2011 at 7:27 AM, wrote: > >> I don't know if i got the URL right, i did not find any examples on the >> REST API documentation for the fileserver. >> > > This should cover it. > > http://docs.puppetlabs.com/guides/rest_api.html#file-server This isn't still clear to me. Would app

Re: [Puppet Users] Ruby script to download files without 'puppet agent'

2011-06-27 Thread Nigel Kersten
On Mon, Jun 27, 2011 at 7:41 AM, wrote: > > On Mon, Jun 27, 2011 at 7:27 AM, wrote: > > > >> We have often the Problem that some files need to be checked for updates > >> faster than the cycle of the puppet agent. I try to solve this with a > >> script which tries to download the files directly

Re: [Puppet Users] Ruby script to download files without 'puppet agent'

2011-06-27 Thread zuber
> On Mon, Jun 27, 2011 at 7:27 AM, wrote: > >> We have often the Problem that some files need to be checked for updates >> faster than the cycle of the puppet agent. I try to solve this with a >> script which tries to download the files directly from the fileserver of >> the puppetmaster. So far i

Re: [Puppet Users] Ruby script to download files without 'puppet agent'

2011-06-27 Thread Nigel Kersten
On Mon, Jun 27, 2011 at 7:27 AM, wrote: > We have often the Problem that some files need to be checked for updates > faster than the cycle of the puppet agent. I try to solve this with a > script which tries to download the files directly from the fileserver of > the puppetmaster. So far i couldn

[Puppet Users] Ruby script to download files without 'puppet agent'

2011-06-27 Thread zuber
We have often the Problem that some files need to be checked for updates faster than the cycle of the puppet agent. I try to solve this with a script which tries to download the files directly from the fileserver of the puppetmaster. So far i couldn't get it to work. I don't know if i got the URL