-1

Whenever I provision vagrant all the data is nil. When I ssh in and specify /etc/puppet/hiera.yaml as the config option i can get the values. How can I get vagrant to use the right hiera.config file?

# Enable the Puppet provisioner
config.vm.provision :puppet do |puppet|
    puppet.manifests_path = "puppet/"
    puppet.manifest_file = "default.pp"
    puppet.module_path = "puppet/modules"
    puppet.hiera_config_path = "puppet/hiera.yaml"
    puppet.options = "--verbose --debug"
end

If you want to see all the code its on my bitbucket. https://bitbucket.org/yamiko/izanagi/src

2 Answers2

0

hm, I dont see any fault in your config. but here's my working config:

node.vm.provision "puppet" do |puppet|
  puppet.hiera_config_path = "puppet-data/hiera.yaml"
  puppet.manifests_path    = "puppet-data/"
  puppet.module_path       = "puppet-modules/modules"
  puppet.options           = "--parser future --verbose"
  puppet.facter = {
    "virtual_type" => "vagrant",
  }

hiera.yaml

:backends:
  - yaml
:yaml:
  :datadir: '/vagrant/puppet-data'
:hierarchy:
  - common

puppet-data is a directory in the directory where the Vagrantfile is stored.

0

It turns out hiera was being loaded but all the data was nil because one of my keys used invalid character for the parser. odd that it gave me nill instead of a parse error...