我正在尝试启动vagrant
虚拟机,并使用其ansible
预配器对其进行预配;
config.vm.provision "ansible" do |ansible|
ansible.limit = "all"
ansible.compatibility_mode = "2.0"
ansible.playbook = "ansible/install.yml"
end
此框为ubuntu/xenial64
设置失败,如下所示:
==> default: Running provisioner: ansible...
default: Running ansible-playbook...
ImportError: No module named site
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
主机是Ubuntu 16.04.05
和ansible 2.7.0
我什至尝试运行一个shell配置程序,该程序在执行ansible之前在来宾上安装python-minimal
,但是没有运气。
编辑:同时,在我的控制器上:
/home/pkara/Desktop
$ python
Python 2.7.12 (default, Dec 4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import site
>>>
/home/pkara/Desktop
$ python3
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import site
>>>