In-module data and foreman puppet module

Hi,

I've been running foreman for a little while now and building and managing
my install - where possible - using the 'theforeman' puppet modules from
the forge.

Recently, I started using R.I.Pienaar's in-module data module
(https://forge.puppetlabs.com/ripienaar/module_data).

The combination of theforeman/foreman and ripienaar/module_data works fine
in production when running either puppet agent or puppet apply.

In a test vagrant machine, though, running puppet apply results in:


Debug: hiera(): Looking up
apache::mod::passenger::passenger_stat_throttle_rate in YAML backendDebug:
hiera(): Looking for data source nodes/foreman
Debug: hiera(): Cannot find datafile
/etc/puppet/environments/local/hieradata/nodes/foreman.yaml, skipping
Debug: hiera(): Looking for data source locations/local
Debug: hiera(): Looking for data source operating_environments/local
Debug: hiera(): Looking for data source roles/mgmt/foreman
Debug: hiera(): Looking for data source modules/apache
Debug: hiera(): Cannot find datafile
/etc/puppet/environments/local/hieradata/modules/apache.yaml, skipping
Debug: hiera(): Looking for data source common
Debug: hiera(): Looking up
apache::mod::passenger::passenger_stat_throttle_rate in Module Data backend
Debug: hiera(): Looking for data in source
/etc/puppet/environments/local/modules/apache/data/common.yaml
Debug: Scope(Class[Apache::Mod::Passenger]): Retrieving template
apache/mod/passenger.conf.erb
Debug:
template[/etc/puppet/environments/local/modules/apache/templates/mod/passenger.conf.erb]:
Bound template variables for
/etc/puppet/environments/local/modules/apache/templates/mod/passenger.conf.erb
in 0.00 seconds
Debug:
template[/etc/puppet/environments/local/modules/apache/templates/mod/passenger.conf.erb]:
Interpolated template
/etc/puppet/environments/local/modules/apache/templates/mod/passenger.conf.erb
in 0.00 seconds
Debug: importing
'/etc/puppet/environments/local/modules/foreman_proxy/manifests/init.pp' in
environment local
Debug: importing
'/etc/puppet/environments/local/modules/foreman_proxy/manifests/config.pp'
in environment local
Debug: Automatically imported foreman_proxy::config from
foreman_proxy/config into local
Debug: importing
'/etc/puppet/environments/local/modules/foreman/manifests/init.pp' in
environment local
Debug: importing
'/etc/puppet/environments/local/modules/foreman/manifests/puppetmaster.pp'
in environment local
Debug: Automatically imported foreman::puppetmaster from
foreman/puppetmaster into local
Debug: importing
'/etc/puppet/environments/local/modules/foreman/manifests/params.pp' in
environment local
Debug: Automatically imported foreman::params from foreman/params into local
Debug: hiera(): Looking up foreman::puppetmaster::reports in YAML backend
Debug: hiera(): Looking for data source nodes/foreman
Debug: hiera(): Cannot find datafile
/etc/puppet/environments/local/hieradata/nodes/foreman.yaml, sk
ipping
Debug: hiera(): Looking for data source locations/local
Debug: hiera(): Looking for data source operating_environments/local
Debug: hiera(): Looking for data source roles/mgmt/foreman
Debug: hiera(): Looking for data source modules/foreman
Debug: hiera(): Cannot find datafile
/etc/puppet/environments/local/hieradata/modules/foreman.yaml,
skipping
Debug: hiera(): Looking for data source common
Debug: hiera(): Looking up foreman::puppetmaster::reports in Module Data
backend
Error: Error from DataBinding 'hiera' while looking up
'foreman::puppetmaster::reports': undefined method module' for nil:NilClass on node foreman.local Wrapped exception: undefined methodmodule' for nil:NilClass
Wrapped exception:
undefined method module' for nil:NilClass Error: Error from DataBinding 'hiera' while looking up 'foreman::puppetmaster::reports': undefined methodmodule' for
nil:NilClass on node foreman.local

I've only reproduced the end of the debug log, but you can see that no
errors where thrown attempting to do in-module data look-ups in
puppetlabs/spache. This only seems to happen with the foreman module. (I've
tested against versions 2.3.0 and 3.0.0.) and only when trying to puppet
apply on a clean machine.

The module is unaltered from the forge version, so it contains no data
directory.

Has anyone else seen this?