Vagrant r10k没有从PuppetFile Windows 10安装模块

时间:2016-12-02 14:32:09

标签: vagrant puppet vagrant-windows vagrant-provision vagrant-plugin

我在Windows 10下运行Vagrant,用木偶配置它。我需要来自forge的一些模块,所以我添加了Puppet文件并使用vagrant plugin install vagrant-r10k安装了vagrant r10k plugin

首先,我尝试了puppet模块,所以我的Puppetfile看起来像:

forge 'http://forge.puppetlabs.com'
mod 'stankevich/python'
mod 'saz/locales'

我必须使用vagrant plugin install puppet安装vagrant插件puppet。但是,当我运行vagrant up mymachine时,我得到了:

==> mymachine: vagrant-r10k: Beginning r10k deploy of puppet modules into c:/test/puppet/vendor using c:/test/puppet/Puppetfile
INFO     -> Loading modules from Puppetfile into queue
INFO     -> Deploying locales into c:/test/puppet/vendor
ERROR    -> Task #<R10K::Task::Module::Sync:0x5afab00> failed while running: Permission denied - puppet module --modulepath c:/test/puppet/vendor --color false install --force saz/locales
INFO     -> Deploying python into c:/test/puppet/vendor
ERROR    -> Task #<R10K::Task::Module::Sync:0x5afab30> failed while running: Permission denied - puppet module --modulepath c:/test/puppet/vendor --color false install --force stankevich/python
RuntimeError: Permission denied - puppet module --modulepath c:/test/puppet/vendor --color false install --force saz/locales

不放弃,我尝试使用存储库,所以我的Puppetfile看起来像:

mod 'locales',
  :git => "https://github.com/saz/puppet-locales.git"

mod 'python',
  :git => "https://github.com/stankevich/puppet-python.git"

这一次,我得到了:

==> mymachine: Invalid syntax in Puppetfile at c:/test/puppet/Puppetfile
NilClass:

我从命令行运行所有内容,尝试了普通模式和管理员模式。 Vagrant版本:1.8.6

1 个答案:

答案 0 :(得分:0)

Ok, so if anyone has such problem:

  1. Install the newest version of Vagrant
  2. Find gem inside Vagrant path (usually c:\HashiCorp\Vagrant\embedded\bin>)
  3. Follow steps given here: http://guides.rubygems.org/ssl-certificate-update/
  4. Install plugins as given in question.