ripienaar/puppet-module-data Not working with the Vagrant puppet provisioner.

67 views
Skip to first unread message

Fraser Goffin

unread,
Jul 26, 2015, 3:16:31 PM7/26/15
to Puppet Users
For some time I have been using the excellent ripienaar/puppet-module-data module. This provides a very familiar way to use Hiera but at the individual module level.

I have recently upgrade to Puppet v4 and this module still works successfully when run with 'puppet apply' (I am using masterless puppet).

It also works successfully if I use the Vagrant shell provisioner with an inline 'puppet apply'

However, when using Vagrant (I'm using the latest 1.7.4 version) with Puppet v4 installed on the VM and the Vagrant puppet provisioner, the module is NOT called (it 'injects' itself after traversing the site level hierarchy), and therefore none of the Hiera values get resolved whether using automatic parameter binding or direct calls.

Given that this works happily outside of Vagrant, or indeed, inside a Vagrant image using puppet apply, and using the Shell provisioner, I am *assuming* (but I could be wrong) that the Vagrant puppet provisioner is where the issue is.

Can anyone shed any light on why this might be and, ideally, what could be done. I'm happy to help ?

I'm going to post the same question to the Vagrant group since it's related, so apologies in advance to anyone who uses both groups for the cross posting.

Kind Regards

Fraser.

Fraser Goffin

unread,
Jul 26, 2015, 3:22:38 PM7/26/15
to Puppet Users
Forgot to mention, this also worked successfully with Vagrant 1.7.2 and Puppet 3.x, but upgrades to both are where we are today.

Daniel Dreier

unread,
Jul 26, 2015, 5:54:36 PM7/26/15
to puppet...@googlegroups.com
On Sun, Jul 26, 2015 at 12:16 PM, Fraser Goffin <gof...@gmail.com> wrote:
For some time I have been using the excellent ripienaar/puppet-module-data module. This provides a very familiar way to use Hiera but at the individual module level.

I have recently upgrade to Puppet v4 and this module still works successfully when run with 'puppet apply' (I am using masterless puppet).

It also works successfully if I use the Vagrant shell provisioner with an inline 'puppet apply'

However, when using Vagrant (I'm using the latest 1.7.4 version) with Puppet v4 installed on the VM and the Vagrant puppet provisioner, the module is NOT called (it 'injects' itself after traversing the site level hierarchy), and therefore none of the Hiera values get resolved whether using automatic parameter binding or direct calls.

Given that this works happily outside of Vagrant, or indeed, inside a Vagrant image using puppet apply, and using the Shell provisioner, I am *assuming* (but I could be wrong) that the Vagrant puppet provisioner is where the issue is.

Can anyone shed any light on why this might be and, ideally, what could be done. I'm happy to help ?


This is a bit of a side note, but Puppet 4 now has a native data-in-modules pattern, which you can read about on Henrik's blog at:

I haven't personally used the Puppet 4 data in modules providers, but it looks like a good way to natively get the functionality RI implemented in puppet-module-data.

--
Daniel Dreier
Technical Operations Engineer
GPG: BA4379FD

Fraser Goffin

unread,
Jul 27, 2015, 3:28:25 AM7/27/15
to Puppet Users
Yes, thanks for the comment. I am aware of this approach, but given the module still works ok under Puppet4 and we have a used it a fair bit, I (and my bosses) would obviously prefer not to have to develop a new solution. That said, it is something I am looking into.

Fraser.

Reply all
Reply to author
Forward
0 new messages