Re: [Puppet-dev] runmode

2012-10-24 Thread R.I.Pienaar
- Original Message - > From: "R.I.Pienaar" > To: puppet-dev@googlegroups.com > Sent: Wednesday, October 24, 2012 6:26:27 PM > Subject: Re: [Puppet-dev] runmode > > > > - Original Message - > > From: "Andy Parker" >

Re: [Puppet-dev] runmode

2012-10-24 Thread R.I.Pienaar
- Original Message - > From: "Andy Parker" > To: puppet-dev@googlegroups.com > Sent: Wednesday, October 24, 2012 5:53:42 PM > Subject: Re: [Puppet-dev] runmode > > On Tue, Oct 23, 2012 at 3:04 PM, R.I.Pienaar wrote: > > > >$puppet_applicat

Re: [Puppet-dev] runmode

2012-10-24 Thread Andy Parker
On Tue, Oct 23, 2012 at 3:04 PM, R.I.Pienaar wrote: > >$puppet_application_name = :agent >require 'puppet' >$puppet_application_mode = Puppet::Util::RunMode[:agent] > >Puppet.settings.use :main, :agent >Puppet.parse_config > > works, but if I set the application name after the

Re: [Puppet-dev] runmode

2012-10-23 Thread R.I.Pienaar
- Original Message - > > no seems I am still missing something: > >$puppet_application_mode = Puppet::Util::RunMode[:agent] >$puppet_application_name = :agent > >Puppet.settings.use :main, :agent >Puppet.parse_config > >p Puppet[:classfile] >p Puppet[:pidfile]

Re: [Puppet-dev] runmode

2012-10-22 Thread R.I.Pienaar
- Original Message - > From: "R.I.Pienaar" > To: puppet-dev@googlegroups.com > Sent: Monday, October 22, 2012 10:55:24 PM > Subject: Re: [Puppet-dev] runmode > > > > - Original Message - > > From: "R.I.Pienaar" > > To:

Re: [Puppet-dev] runmode

2012-10-22 Thread R.I.Pienaar
- Original Message - > From: "Jeff McCune" > To: puppet-dev@googlegroups.com > Sent: Monday, October 22, 2012 11:12:19 PM > Subject: Re: [Puppet-dev] runmode > > On Mon, Oct 22, 2012 at 2:55 PM, R.I.Pienaar < r...@devco.net > wrote: > > &g

Re: [Puppet-dev] runmode

2012-10-22 Thread Jeff McCune
On Mon, Oct 22, 2012 at 2:55 PM, R.I.Pienaar wrote: > > for 2.7 it seems this is the magic: > >require 'puppet' >$puppet_application_mode = Puppet::Util::RunMode[:agent] >Puppet.settings.use :main, :agent >Puppet.parse_config > > have to say I am surprised about the global variabl

Re: [Puppet-dev] runmode

2012-10-22 Thread R.I.Pienaar
- Original Message - > From: "R.I.Pienaar" > To: puppet-dev@googlegroups.com > Sent: Monday, October 22, 2012 10:00:40 PM > Subject: Re: [Puppet-dev] runmode > > > > - Original Message - > > From: "Andy Parker" > > To:

Re: [Puppet-dev] runmode

2012-10-22 Thread R.I.Pienaar
- Original Message - > From: "Andy Parker" > To: puppet-dev@googlegroups.com > Sent: Monday, October 22, 2012 7:57:36 PM > Subject: Re: [Puppet-dev] runmode > > On Mon, Oct 22, 2012 at 11:03 AM, Brice Figureau > wrote: > > On 22/10/12 19:25, R.I.P

Re: [Puppet-dev] runmode

2012-10-22 Thread Chris Price
On Mon, Oct 22, 2012 at 12:27 PM, Andy Parker wrote: > On Mon, Oct 22, 2012 at 12:05 PM, Chris Price > wrote: > > Out of curiosity, why wasn't run_mode a parameter that was passed to > initialize_settings? > At the time, I think I was assuming that anyone who was trying to use puppet as library

Re: [Puppet-dev] runmode

2012-10-22 Thread Andy Parker
On Mon, Oct 22, 2012 at 12:05 PM, Chris Price wrote: > My intention when I was last working on this stuff was that you could simply > call "Puppet.initialize_settings" (perhaps after calling Puppet.run_mode=), > and that the rest > of the ugly internal stuff (initialize_application_defaults, etc.)

Re: [Puppet-dev] runmode

2012-10-22 Thread Chris Price
My intention when I was last working on this stuff was that you could simply call "Puppet.initialize_settings" (perhaps after calling Puppet.run_mode=), and that the rest of the ugly internal stuff (initialize_application_defaults, etc.) would be abstracted away. However, I'm not entirely sure whe

Re: [Puppet-dev] runmode

2012-10-22 Thread Andy Parker
On Mon, Oct 22, 2012 at 11:03 AM, Brice Figureau wrote: > On 22/10/12 19:25, R.I.Pienaar wrote: >> hello, >> >> I need to get Puppet to read its config file and specifically use the >> settings like an agent would. >> >> I need this for 2.7 and 3.0 >> >> In trying to figure this out for 3.0 I have

Re: [Puppet-dev] runmode

2012-10-22 Thread Brice Figureau
On 22/10/12 19:25, R.I.Pienaar wrote: > hello, > > I need to get Puppet to read its config file and specifically use the > settings like an agent would. > > I need this for 2.7 and 3.0 > > In trying to figure this out for 3.0 I have the following: > >require 'puppet' >require 'puppet/ut

[Puppet-dev] runmode

2012-10-22 Thread R.I.Pienaar
hello, I need to get Puppet to read its config file and specifically use the settings like an agent would. I need this for 2.7 and 3.0 In trying to figure this out for 3.0 I have the following: require 'puppet' require 'puppet/util/run_mode' Puppet.settings.preferred_run_mode = :agent