Permalink
Browse files

set puppet config variables AFTER parse_config

fixes the case, where manifest gets set to a bad value in puppet.conf
noticed by Oliver Hookins
  • Loading branch information...
1 parent 0448454 commit d1dc98c86fee8759d568473ed4ce494474138cd6 @nistude nistude committed Sep 4, 2010
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/cucumber-puppet/puppet.rb
View
6 lib/cucumber-puppet/puppet.rb
@@ -41,9 +41,11 @@ def klass=(klass)
# @manifest defaults to @confdir + '/manifests/site.pp'
#
def compile_catalog( node = nil )
- Puppet[:confdir] = @confdir
- Puppet[:manifest] = @manifest
+ Puppet.settings.handlearg("--confdir", @confdir)
Puppet.parse_config
+ # reset confdir in case it got overwritten
+ Puppet.settings.handlearg("--confdir", @confdir)
+ Puppet.settings.handlearg("--manifest", @manifest)
unless node.is_a?(Puppet::Node)
node = Puppet::Node.new(@facts['hostname'], :classes => @klass)

0 comments on commit d1dc98c

Please sign in to comment.