我正在调查Ansible的服务器和应用程序配置。我的应用程序当前在Vagrant中配有shell脚本。我没有重写我的脚本,而是取了一个示例并尝试部署它。
它似乎可以很好地部署,但是在一系列成功的步骤之后,我看到了一条失败消息:
» vagrant provision ~/vm/blvagrant 1 ↵
[default] Running provisioner: ansible...
PLAY [web-servers] ************************************************************
GATHERING FACTS ***************************************************************
ok: [192.168.9.149]
TASK: [install python-software-properties] ************************************
ok: [192.168.9.149] => {"changed": false, "item": ""}
TASK: [add nginx ppa if it ubuntu 10.04 and up] *******************************
ok: [192.168.9.149] => {"changed": false, "item": "", "repo": "ppa:nginx/stable", "state": "present"}
TASK: [update apt repo] *******************************************************
ok: [192.168.9.149] => {"changed": false, "item": ""}
TASK: [install nginx] *********************************************************
ok: [192.168.9.149] => {"changed": false, "item": ""}
TASK: [copy fixed init for nginx] *********************************************
ok: [192.168.9.149] => {"changed": false, "gid": 0, "group": "root", "item": "", "mode": "0755", "owner": "root", "path": "/etc/init.d/nginx", "size": 2321, "state": "file", "uid": 0}
TASK: [service nginx] *********************************************************
ok: [192.168.9.149] => {"changed": false, "item": "", "name": "nginx", "state": "started"}
TASK: [write nginx.conf] ******************************************************
ok: [192.168.9.149] => {"changed": false, "gid": 0, "group": "root", "item": "", "mode": "0644", "owner": "root", "path": "/etc/nginx/nginx.conf", "size": 1067, "state": "file", "uid": 0}
PLAY RECAP ********************************************************************
192.168.9.149 : ok=8 changed=0 unreachable=0 failed=0
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
我如何获得其他调试信息?我已经将其添加ansible.verbose = true
到流浪者配置中,这将导致字典显示在上面的输出中。
1
根据github.com/mitchellh/vagrant/issues/2004,这是当前Vagrant版本的错误。我能够基于github.com/mitchellh/vagrant/commit/…手动修补/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/provisioners/ansible/provisioner.rb 。
—
Brian Lyttle