Hi again! Is there any way to override client-specified environment in puppet master? I would like my puppetmaster node definition to set the real environment the node is in. Tnx for info, b. -- 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.
On 19/01/11 1:41 PM, Bostjan Skufca wrote:> Hi again! > > Is there any way to override client-specified environment in puppet > master? I would like my puppetmaster node definition to set the real > environment the node is in.I don''t think there is directly ... I work around this by setting a variable in the node definition if I want the client to use an environment other than production by default. My puppet client class then uses this variable value as the environment value in the clients puppet.conf (via a template) There''s been a bit of discussion on this ... a quick search didn''t show up a ticket though ... my foo''s probably failing me today. -- 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.
> I work around this by setting a variable in the node definition if I > want the client to use an environment other than production by default. > My puppet client class then uses this variable value as the environment > value in the clients puppet.conf (via a template)This is my current setup too, btw I use two puppet instances which manage each other (and one manages everything else too). This way it is way harder to lock yourself out of automation. But I want to set it on master for various reasons (mainly security and node separation, various environments for various clients (not puppet clients, but company clients) which should not be able to see other client''s stuff by just changing the environment manually). Tnx, b. On 19 jan., 04:08, Michael Knox <michael.knox...@gmail.com> wrote:> On 19/01/11 1:41 PM, Bostjan Skufca wrote:> Hi again! > > > Is there any way to override client-specified environment in puppet > > master? I would like my puppetmaster node definition to set the real > > environment the node is in. > > I don''t think there is directly ... > > I work around this by setting a variable in the node definition if I > want the client to use an environment other than production by default. > My puppet client class then uses this variable value as the environment > value in the clients puppet.conf (via a template) > > There''s been a bit of discussion on this ... a quick search didn''t show > up a ticket though ... my foo''s probably failing me today.-- 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.
On Tue, Jan 18, 2011 at 7:16 PM, Bostjan Skufca < bostjan.skufca.work@gmail.com> wrote:> > I work around this by setting a variable in the node definition if I > > want the client to use an environment other than production by default. > > My puppet client class then uses this variable value as the environment > > value in the clients puppet.conf (via a template) > > This is my current setup too, btw I use two puppet instances which > manage each other (and one manages everything else too). This way it > is way harder to lock yourself out of automation. > > But I want to set it on master for various reasons (mainly security > and node separation, various environments for various clients (not > puppet clients, but company clients) which should not be able to see > other client''s stuff by just changing the environment manually). >if you use an external node classifier, you can set it there. http://docs.puppetlabs.com/guides/external_nodes.html> Tnx, > b. > > > > > On 19 jan., 04:08, Michael Knox <michael.knox...@gmail.com> wrote: > > On 19/01/11 1:41 PM, Bostjan Skufca wrote:> Hi again! > > > > > Is there any way to override client-specified environment in puppet > > > master? I would like my puppetmaster node definition to set the real > > > environment the node is in. > > > > I don''t think there is directly ... > > > > I work around this by setting a variable in the node definition if I > > want the client to use an environment other than production by default. > > My puppet client class then uses this variable value as the environment > > value in the clients puppet.conf (via a template) > > > > There''s been a bit of discussion on this ... a quick search didn''t show > > up a ticket though ... my foo''s probably failing me today. > > -- > 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<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- 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.
On Jan 18, 2011, at 7:38 PM, Dan Bode wrote:> On Tue, Jan 18, 2011 at 7:16 PM, Bostjan Skufca <bostjan.skufca.work@gmail.com> wrote: > > I work around this by setting a variable in the node definition if I > > want the client to use an environment other than production by default. > > My puppet client class then uses this variable value as the environment > > value in the clients puppet.conf (via a template) > > This is my current setup too, btw I use two puppet instances which > manage each other (and one manages everything else too). This way it > is way harder to lock yourself out of automation. > > But I want to set it on master for various reasons (mainly security > and node separation, various environments for various clients (not > puppet clients, but company clients) which should not be able to see > other client''s stuff by just changing the environment manually). > > if you use an external node classifier, you can set it there. > > http://docs.puppetlabs.com/guides/external_nodes.htmlI don''t have the bug report on hand, but I believe that this won''t lock clients out of files and/or plugins in a different environment. -- 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.
John Warburton
2011-Jan-19 06:10 UTC
Re: [Puppet Users] Re: Set client environment on master
On 19 January 2011 14:40, Patrick <kc7zzv@gmail.com> wrote:> On Jan 18, 2011, at 7:38 PM, Dan Bode wrote: > > On Tue, Jan 18, 2011 at 7:16 PM, Bostjan Skufca < > bostjan.skufca.work@gmail.com> wrote: > >> > I work around this by setting a variable in the node definition if I >> > want the client to use an environment other than production by default. >> > My puppet client class then uses this variable value as the environment >> > value in the clients puppet.conf (via a template) >> >> But I want to set it on master for various reasons (mainly security >> and node separation, various environments for various clients (not >> puppet clients, but company clients) which should not be able to see >> other client''s stuff by just changing the environment manually). >> > > if you use an external node classifier, you can set it there. > > http://docs.puppetlabs.com/guides/external_nodes.html > > > I don''t have the bug report on hand, but I believe that this won''t lock > clients out of files and/or plugins in a different environment. > > I actually want to be able to have it the other way around - the nodeclassifier sets the default environment, but my client can override if it so wishes - https://projects.puppetlabs.com/issues/3910 John -- 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.
Bruce Richardson
2011-Jan-19 06:41 UTC
Re: [Puppet Users] Re: Set client environment on master
On Wed, Jan 19, 2011 at 05:10:56PM +1100, John Warburton wrote:> > I actually want to be able to have it the other way around - the node > classifier sets the default environment, but my client can override if it so > wishes - https://projects.puppetlabs.com/issues/3910*Looks at discussion* Ouch. If the client were still allowed to override the environment, even when the server was explicitly set to be authoritative, that would make a complete nonsense of "authoritative". Glad the discussion has gone the other way. -- Bruce Get thee behind me, Stan: for it is written, thou hast gotten me into another fine mess. -- Oliver 4:8 -- 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.
On Tue, Jan 18, 2011 at 06:41:26PM -0800, Bostjan Skufca wrote:> Hi again! > > Is there any way to override client-specified environment in puppet > master? I would like my puppetmaster node definition to set the real > environment the node is in. > > Tnx for info, > b. >I dont think this will work out of the box because IIRC the manifestdir is also bound to the environment. So you have to know the environment before you can lookup the actual nodedefinition. Maybe you can change the modulepath in your node definition or write a custom function that changes the modulepath/environemnt but I''m not sure if that really works in a sane way. -Stefan
John Warburton
2011-Jan-19 23:04 UTC
Re: [Puppet Users] Re: Set client environment on master
On 19 January 2011 17:41, Bruce Richardson <itsbruce@workshy.org> wrote:> On Wed, Jan 19, 2011 at 05:10:56PM +1100, John Warburton wrote: > > wishes - https://projects.puppetlabs.com/issues/3910 > > *Looks at discussion* Ouch. If the client were still allowed to > override the environment, even when the server was explicitly set to be > authoritative, that would make a complete nonsense of "authoritative". > Glad the discussion has gone the other way. >This may be true for you, but not for all sites. What I am looking for is a way to set the level of authoritativeness on the server, so that you and I can coexist. I imagine you would set the server to always be authoritative, where I would set it to be "let the client choose", but default to what the server thinks if the client doesn''t supply an option That means the authoritativeness policy that works for our site (and I know another large site that manages desktops with puppet lets the client set the environment) won''t interrupt yours John -- 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.
The way John sums it up really makes sense. Feature request? b. On 20 jan., 00:04, John Warburton <jwarbur...@gmail.com> wrote:> On 19 January 2011 17:41, Bruce Richardson <itsbr...@workshy.org> wrote: > > > On Wed, Jan 19, 2011 at 05:10:56PM +1100, John Warburton wrote: > > > wishes -https://projects.puppetlabs.com/issues/3910 > > > *Looks at discussion* Ouch. If the client were still allowed to > > override the environment, even when the server was explicitly set to be > > authoritative, that would make a complete nonsense of "authoritative". > > Glad the discussion has gone the other way. > > This may be true for you, but not for all sites. What I am looking for is a > way to set the level of authoritativeness on the server, so that you and I > can coexist. I imagine you would set the server to always be authoritative, > where I would set it to be "let the client choose", but default to what the > server thinks if the client doesn''t supply an option > > That means the authoritativeness policy that works for our site (and I know > another large site that manages desktops with puppet lets the client set the > environment) won''t interrupt yours > > John-- 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.
John Warburton
2011-Jan-20 02:31 UTC
Re: [Puppet Users] Re: Set client environment on master
On 20 January 2011 13:18, Bostjan Skufca <bostjan.skufca.work@gmail.com>wrote:> The way John sums it up really makes sense. Feature request? >Alan Barrett did this in note 17 - https://projects.puppetlabs.com/issues/3910#note-17 John -- 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.
Bruce Richardson
2011-Jan-20 06:18 UTC
Re: [Puppet Users] Re: Set client environment on master
On Thu, Jan 20, 2011 at 10:04:37AM +1100, John Warburton wrote:> On 19 January 2011 17:41, Bruce Richardson <itsbruce@workshy.org> wrote: > > > On Wed, Jan 19, 2011 at 05:10:56PM +1100, John Warburton wrote: > > > wishes - https://projects.puppetlabs.com/issues/3910 > > > > *Looks at discussion* Ouch. If the client were still allowed to > > override the environment, even when the server was explicitly set to be > > authoritative, that would make a complete nonsense of "authoritative". > > Glad the discussion has gone the other way. > > > > This may be true for you, but not for all sites. What I am looking for is a > way to set the level of authoritativeness on the server, so that you and I > can coexist.Yes, I get that. We aren''t in disagreement at all. I took issue, rather, with the earlier suggestion in the thread that the client be able to override no matter what was set on the server, for "backwards compatibility. -- Bruce Explota!: miles de lemmings no pueden estar equivocados. -- 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.