0

Not experienced with puppet and vagrant. We used to have all the puppet settings in a big puppet repository and our vagrant instance worked fine. Recently, to have things better isolated so they are not rolled out accidentally, we have a certain path from the big puppet repos separated into a new puppet repos. But I still need all the facters living within the old big repos while the server specific setting from the new repos. Unfortunately, I cannot just specify the big old repos as a module path as my server specific settings will come from the old directory in the old repos, but if I just specify the new repos as the module path, then I miss all the facts. And I have been googling crazily to find a way to specify the facter path for vagrant in vain :(

old_repos -> dir -> my_server_setting
             -> module1 -> facter
             -> module2 -> facter
             ....

new_repos -> my_server_setting

can anyone please give me some hints? many thanks

gigi2
  • 1,996
  • 1
  • 17
  • 22

1 Answers1

0

The module_path can be a vector

Vagrant::Config.run do |config|
  ...
  config.vm.provision :puppet do |puppet|
    puppet.manifests_path = "manifests"
    puppet.module_path = ["old_repos","new_repos"]
    puppet.manifest_file  = "base.pp"
  end
end

I never tried but I guess the hiera_config_path can specify a vector of location too so if you have hiera defined in both the old and the new repos you should be able to point the 2.

Frederic Henri
  • 51,761
  • 10
  • 113
  • 139
  • Thank you, Frederic. Hate to say this. I have tried listing multiple module paths. Still not working. Now I got could not find class .... But I think I have linked the right directories :( Can I have some infor on how vagrant loads puppet classes? – gigi2 Sep 14 '16 at 17:57
  • hum .. can you ssh into the VM and make sure the modules are correctly mount as `/tmp/vagrant-puppet/modules-0` and `/tmp/vagrant-puppet/modules-1` ? can you try to run the puppet command directly from the VM using `puppet apply --modulepath : manifests/base.pp` – Frederic Henri Sep 14 '16 at 19:29