2016-09-13 32 views
0

我有我的主机的这种配置:如何使用vagrant 1.7.4设置ansible_local?

[email protected]:~/123$ lsb_release -rcd 
Description: Ubuntu 14.04.5 LTS 
Release:  14.04 
Codename:  trusty 
[email protected]:~/123$ vagrant -v 
Vagrant 1.7.2 

我尝试部署我的客人与ansible_local规定。这是我的流浪文件:

Vagrant.configure("2") do |config| 
    config.vm.box = "ubuntu/trusty64" 
    # Run Ansible from the Vagrant VM 
    config.vm.provision "ansible_local" do |ansible| 
    ansible.playbook = "playbook.yml" 
    end 
end 

当我尝试将它部署到我收到此输出:

[email protected]:~/123$ vagrant up 
Bringing machine 'default' up with 'virtualbox' provider... 
There are errors in the configuration of this machine. Please fix 
the following errors and try again: 

vm: 
* The '' provisioner could not be found. 

我该如何解决这个问题?

+0

你能证明你的剧本文件所以你的问题可以完全转载? –

+0

我的剧本是空的。 –

+0

问题是由Vagrant版本引起的。当我升级到1.8.5。它是固定的。 –

回答

1

流浪V1.7版本有一个bug导致这个:

$ sudo dpkg -i ./vagrant_1.7.4_x86_64.deb 
(Reading database ... 57030 files and directories currently installed.) 
Preparing to unpack ./vagrant_1.7.4_x86_64.deb ... 
Unpacking vagrant (1:1.7.4) over (1:1.7.3) ... 
Setting up vagrant (1:1.7.4) ... 
$ vagrant up 
Bringing machine 'default' up with 'virtualbox' provider... 
There are errors in the configuration of this machine. Please fix 
the following errors and try again: 

vm: 
* The 'ansible_local' provisioner could not be found. 

升级到最新版本1.8.5(或至少是1.8.0):

$ sudo dpkg -i vagrant_1.8.0_x86_64.deb 
(Reading database ... 57030 files and directories currently installed.) 
Preparing to unpack vagrant_1.8.0_x86_64.deb ... 
Unpacking vagrant (1:1.8.0) over (1:1.7.4) ... 
Setting up vagrant (1:1.8.0) ... 
$ vagrant up 
Bringing machine 'default' up with 'virtualbox' provider... 
==> default: Importing base box 'ubuntu/trusty64'... 
==> default: Matching MAC address for NAT networking... 
==> default: Checking if box 'ubuntu/trusty64' is up to date... 
相关问题