我将使用vagrant和puppet进行配置。我的vagrantfile中的配置如下:
config.vm.provision "puppet" do |puppet|
puppet.manifests_path = "puppet/manifests"
puppet.hiera_config_path = "puppet/hiera.yaml"
puppet.module_path = "../puppet/modules"
puppet.manifest_file = "site.pp"
end
我有另一个虚拟机没有被Vagrant管理,想要在上面应用Puppet配置。我想使用与Vagrant使用的完全相同的“puppet apply”命令。
请问有人能告诉我Vagrant使用的确切“puppet apply”命令是什么吗?
options << "--modulepath '#{module_paths.join(module_path_sep)}'"
,options << "--hiera_config=#{@hiera_config_path}"
,options << "--manifestdir #{manifests_guest_path}"
,options << @manifest_file
。因此,将构建为类似于puppet apply -modulepath /tmp/puppet/modules -hiera_config=/tmp/puppet/hiera.yaml -manifestdir /tmp/puppet/manifests site.pp
的内容。 - Remus Rusanu