ruby - Scope of modules using Puppet in a Vagrant multi machine environment -
i have projekt setup multi machine environment vagrant. had fix problems, caused redirect issue https, solving these lead other errors, fixed in projects except 1 now, uses multi machine feature of vagrant.
so have folder structure:
/vagrantfile /puppet/box_1/puppetfile /puppet/box_1/manifests/site.pp
this code snippet, define provision directories:
config.vm.provision :puppet |puppet| puppet.manifests_path = "puppet/box_1/manifests" puppet.manifest_file = "site.pp" end
my puppetfile looks this:
forge "https://forgeapi.puppetlabs.com" mod 'tpl0ch/composer' mod 'puppetlabs/apt' mod 'puppetlabs/apache' mod 'puppetlabs/firewall'
in site.pp try include apt
, error message:
error: evaluation error: error while evaluating function call, not find class ::apt project.local @ /tmp/vagrant-puppet/manifests-f2b1fd0ac42b51938ed6ae7e6917367e/site.pp:1:1 on node project.local
when rearange puppet files this:
/vagrantfile /puppet/puppetfile /puppet/manifests/site.pp
like common way of setting up, works without problem, mentioned, there other boxes, use different puppetfiles , site.pp files, folder structure makes kinda sense. seems, doesn'even matter, if delete config other boxes, , setup vagrantfile, if 1 box, confused, how location, of these files influence scope of classes.
so questions here: there way, keep folder structure , still have these modules defined in puppetfile available in site.pp? or kinda bad practice organize way? searching examples this, couldn't find reason...
edit: seems, on provision puppetfile isnt used anymore, when not located in /puppet/
maybe have tell vagrant how use it?
define librarian should find puppet file
vagrant.configure("2") |config| config.librarian_puppet.puppetfile_dir = "puppet/box1" config.vm.provision :puppet |puppet| puppet.manifests_path = "puppet/box_1/manifests" puppet.manifest_file = "site.pp" end
Comments
Post a Comment