Actions
Bug #2085
closedClasses import fails on first module with Puppet 3: Could not find value for $confdir
Description
puppet.conf contains the following environment config and a single module exists under /etc/puppet/modules/development
:
[development]
modulepath = /etc/puppet/modules/development:/etc/puppet/modules/common
The environment can be listed, but the class can't:
$ curl http://foreman:8443/puppet/environments
["development","production"]
$ curl http://foreman:8443/puppet/environments/development/classes
[]
The first search with PuppetClass.scan_manifest
is always failing, so the first module found isn't getting parsed, only subsequent modules:
irb -I lib/ -rproxy
irb(main):001:0> Proxy::Puppet::PuppetClass.scan_directory('/etc/puppet/modules/development')
Error while parsing /etc/puppet/modules/development/test/manifests/init.pp: Could not parse for environment production: Error converting value for param 'manifest': Error converting value for param 'manifestdir': Could not find value for $confdir
=> []
irb(main):002:0> Proxy::Puppet::PuppetClass.scan_directory('/etc/puppet/modules/development')
=> [#<Proxy::Puppet::PuppetClass:0x7f416cb7e9e0 @params={"foo"=>"fqdn_rand(10, undef)"}, @klass="test">]
Actions