Project

General

Profile

Feature #1552

Puppet proxy should support $confdir in modulepath when looking for environments/classes

Added by Jason Antman over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Puppet
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

This is related to issue:1387. For those of use who followed the PuppetLabs blog (http://puppetlabs.com/blog/git-workflow-and-puppet-environments/) literally:

[main]
  server = puppet.example.com
  environment = production
  confdir = /etc/puppet
[master]
  environment = production
  manifest    = $confdir/environments/$environment/manifests/site.pp
  modulepath  = $confdir/environments/$environment/modules
[agent]
  report = true
  show_diff = true
  environment = production

The smart-proxy puppet component is returning an empty list of environments. As far as I can tell, the solution here can be as simple as looking at the modulepath value (in the dynamic environments block in lib/proxy/puppet/environment.rb) and, if that value contains "$confdir" and conf[:main][:confdir] is not nil, making the replacement.

I'm going to try and submit a patch for this later this week, but be warned, I'll be flipping through Learning Ruby as I do it.


Related issues

Related to Smart Proxy - Bug #1761: confdir appears to be broken again in 1.0rc3Closed2012-07-17
Has duplicate Foreman - Feature #1106: puppet variable $confdir is not evaluatedDuplicate2011-08-11

Associated revisions

Revision 2d232cff (diff)
Added by Jason Antman over 7 years ago

fixes #1552 - expand $confdir if used in puppet.conf modulepath

History

#1 Updated by Jason Antman over 7 years ago

Not exactly tested, but I have code for this that works in my environment:
https://github.com/jantman/smart-proxy/commit/95314b5cee6e93380efb7d64fbe50511f194f031
and a pull request:
https://github.com/theforeman/smart-proxy/pull/14

#2 Updated by Jason Antman over 7 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF